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 thelastest_chore_logview (sorted byfield_log_dateDESC,idDESC) 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_refis the source of truth.process_chorenextduederivesfield_last_chore_log_dateandfield_next_due_datefrom it on every chore save.
See docs/sites/inventory.md → Chore automation.