Skip to content

Add a history filter for events missing an accounting rule #13096

Description

@LefterisJP

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions