Backdating existing chore doesn't change chore's last log date

Task type
Project
Changed

Context

Logging a chore sets the current date by default.

If you create a chore log, then edit it to a previous date, the chore will still show the later date.

Done

  • Update ECA model to check if the chore log date is being changed and matches the chore's current log date. If it does, set it to the new log date value. Solved differently: process_azwntkf ("Chore log: update chore") now runs on chore log insert, update and delete, re-queries the lastest_chore_log view (sorted by field_log_date DESC, id DESC) and stores the result. It no longer assumes the log being saved is the newest, so back-dating needs no special case.
  • Also consider adding a last chore log reference field (instead?). Added: field_last_chore_log_ref is the source of truth. process_chorenextdue derives field_last_chore_log_date and field_next_due_date from it on every chore save.

See docs/sites/inventory.md → Chore automation.