Description
Events without an accounting rule are only shown as a warning icon per row in the History view. There is no way to list them, so after a PnL report says "N events were excluded because they have no accounting rule" the user has to scroll and hunt for icons.
The status is computed in Python after the SQL query (query_missing_accounting_rules), only for the current page, so it cannot be filtered with state_markers.
Task
Persist the status so it becomes a real filter:
- Backend: add a
MISSING_ACCOUNTING_RULE state marker (or a dedicated table keyed by event id), written when the status is resolved and cleared/invalidated where the accountant cache is already invalidated on rule add/edit/delete and on event changes.
- Backend: accept it in the
state_markers filter of POST /history/events so it joins like the other markers.
- Frontend: expose it as a filter chip in the History view. The existing "Add missing accounting rule" row action then covers the fix flow.
Description
Events without an accounting rule are only shown as a warning icon per row in the History view. There is no way to list them, so after a PnL report says "N events were excluded because they have no accounting rule" the user has to scroll and hunt for icons.
The status is computed in Python after the SQL query (
query_missing_accounting_rules), only for the current page, so it cannot be filtered withstate_markers.Task
Persist the status so it becomes a real filter:
MISSING_ACCOUNTING_RULEstate marker (or a dedicated table keyed by event id), written when the status is resolved and cleared/invalidated where the accountant cache is already invalidated on rule add/edit/delete and on event changes.state_markersfilter ofPOST /history/eventsso it joins like the other markers.