Track chore status with state machine

Changed

Summary

Create a module Inventory Chore Log, and prototype a chore workflow with state machine.

Implementation

Chore workflow:
New => Scheduled => Done => Expired

Chore log workflow:
Pending => In Progress => Done

When a chore is done, set the latest log date to the current date. Then create a corresponding chore log and set the chore log date to the same time, and the status to done.

On cron run, check all completed chores for expiry.

A chore is expired when the current date is after the latest log date plus it's frequency duration.

Install hook to set existing chores/chore logs to done.

Disable existing ECAs.

Task type
Project
Parent task
Topics
Modules