Skip to content

Accept frontend field names (payee, account, imported_payee) in rules#215

Open
DAdjadj wants to merge 2 commits into
bvanelli:mainfrom
DAdjadj:fix/rule-field-aliases
Open

Accept frontend field names (payee, account, imported_payee) in rules#215
DAdjadj wants to merge 2 commits into
bvanelli:mainfrom
DAdjadj:fix/rule-field-aliases

Conversation

@DAdjadj

@DAdjadj DAdjadj commented Jul 12, 2026

Copy link
Copy Markdown

Closes #211

The Actual frontend stores rule conditions and actions using app-level field names (payee, account, imported_payee), while the models only accepted the internal column names (description, acct, imported_description). Any budget containing a rule that conditions on payee or account failed validation on get_ruleset(), which in turn made run_rules() unusable for that budget.

This adds a BeforeValidator that maps the frontend names to their internal counterparts on both Condition.field and Action.field, plus a test loading conditions/actions exactly as the frontend stores them (including the type values it writes) and running the resulting rule against transactions.

Same class of issue as #46 and #67, which covered other field/type values.

DAdjadj added 2 commits July 12, 2026 01:45
…conditions and actions

The Actual frontend stores rules with app-level field names, while the
models only accepted the internal column names. A budget containing a
rule that conditions on payee or account failed validation on load.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Rules with 'payee' or 'account' condition fields (as stored by Actual) fail validation

1 participant