Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Renaming budget breaks "Set budget to..." rule #1549

Closed
jpelgrom opened this issue Jul 12, 2018 · 2 comments
Closed

Renaming budget breaks "Set budget to..." rule #1549

jpelgrom opened this issue Jul 12, 2018 · 2 comments
Labels
fixed Bugs that are fixed (in a coming release).

Comments

@jpelgrom
Copy link

jpelgrom commented Jul 12, 2018

Using Firefly 4.7.5.

If you create a rule which uses a "Set budget to..." action, renaming the budget afterwards will not update the budget used in the rule.
Considering the nature of budgets, I expect the rule to 'follow' the budget even when it is renamed: it's still the same budget.
However, in case not changing the budget is the intended behaviour, I would at least expect it to continue setting the budget to the old value (so technically that's a new budget?) for new matching transactions, but instead it sets no budget at all.

Example
Expected when following the budget:

  • Create budget 'A'
  • Create rule which includes a "Set budget to..." action, value 'A' (clicked on autosuggest)
  • Rename budget 'A' to 'B'
  • Create a new transaction which matches the rule, budget set to 'B'

Expected when not changing the budget is intended:

  • Create budget 'A' (ID: 1)
  • Create rule which includes a "Set budget to..." action, value 'A' (clicked on autosuggest)
  • Rename budget 'A' to 'B'
  • Create a new transaction which matches the rule, budget set to 'A' which is newly created (ID: 2)

Actual behaviour:

  • Create budget 'A'
  • Create rule which includes a "Set budget to..." action, value 'A' (clicked on autosuggest)
  • Rename budget 'A' to 'B'
  • Create a new transaction which matches the rule, no budget set at all (transaction still shows up when clicking the flask icon to test the rule)

Clicking 'update rule' after the budget name is updated does show an error message:

(the budget name was originally "Transport/OV 🚄", changed to "🚄 Transport/OV")

The stack trace on /debug doesn't appear to change when adding a new transaction where the rule matches an old category name.

@JC5
Copy link
Member

JC5 commented Jul 12, 2018

That can be fixed. Bills already respond to such changes so it won't be difficult to fix this one as well. Thanks for reporting!

@JC5 JC5 added the bug label Jul 12, 2018
@JC5
Copy link
Member

JC5 commented Jul 22, 2018

I've added a small routine that should pick this up. Works on the demo site already.

@JC5 JC5 added the fixed Bugs that are fixed (in a coming release). label Jul 22, 2018
@JC5 JC5 closed this as completed in aed7e6d Jul 28, 2018
@lock lock bot locked as resolved and limited conversation to collaborators Jan 23, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
fixed Bugs that are fixed (in a coming release).
Projects
None yet
Development

No branches or pull requests

2 participants