[GH-ISSUE #2426] [Bug]: Budget Goal Templates does not recalculate available funds per priority level when using monthly apply/overwrite template #7904

Closed
opened 2026-04-10 18:02:01 -05:00 by GiteaMirror · 4 comments
Owner

Originally created by @thennekx on GitHub (Mar 6, 2024).
Original GitHub issue: https://github.com/actualbudget/actual/issues/2426

Verified issue does not already exist?

  • I have searched and found no existing issue
  • I have checked my server logs and could not see any errors there
  • I will be attaching my server logs to this issue
  • I will be attaching my client-side (browser) logs to this issue
  • I understand that this issue will be automatically closed if insufficient information is provided

What happened?

Version used: v24.3.0
Reproduction scenario:

  • Multiple templates that make use of "of available funds" with different priorities
  • Usage of the Apply/Overwrite budget template for the whole month.

I believe there should be a recalculation of available funds every time a priority level is finished.
Currently this is not the case, causing the resulting amounts to be equal for both "#template-2 2% of available funds" and "#template-3 2% of available funds".
For example:

Expected behavior Current behavior
Requested Assigned Available funds Assigned Available funds
Start 1000 1000
Priority 1 50% 500 500 500 Not recalculated
Priority 2 10% 50 450 100 Not recalculated
Priority 3 10% 45 405 100 Not recalculated
Priority 4 10% 40,5 364,5 100 Not recalculated

What error did you receive?

No response

Where are you hosting Actual?

Docker

What browsers are you seeing the problem on?

Firefox

Operating System

Windows 11

Originally created by @thennekx on GitHub (Mar 6, 2024). Original GitHub issue: https://github.com/actualbudget/actual/issues/2426 ### Verified issue does not already exist? - [X] I have searched and found no existing issue ### Is this related to GoCardless, Simplefin or another bank-sync provider? - [ ] I have checked my server logs and could not see any errors there - [ ] I will be attaching my server logs to this issue - [ ] I will be attaching my client-side (browser) logs to this issue - [ ] I understand that this issue will be automatically closed if insufficient information is provided ### What happened? Version used: v24.3.0 Reproduction scenario: - Multiple templates that make use of "of available funds" with different priorities - Usage of the Apply/Overwrite budget template for the whole month. I believe there should be a recalculation of available funds every time a priority level is finished. Currently this is not the case, causing the resulting amounts to be equal for both "#template-2 2% of available funds" and "#template-3 2% of available funds". For example: | | |Expected behavior | | Current behavior | | | ---------- | --------- | ----------------- | ---------------- | ---------------- | ---------------- | | | Requested | Assigned | Available funds | Assigned | Available funds | | Start | | | 1000 | | 1000 | | Priority 1 | 50% | 500 | 500 | 500 | Not recalculated | | Priority 2 | 10% | 50 | 450 | 100 | Not recalculated | | Priority 3 | 10% | 45 | 405 | 100 | Not recalculated | | Priority 4 | 10% | 40,5 | 364,5 | 100 | Not recalculated | ### What error did you receive? _No response_ ### Where are you hosting Actual? Docker ### What browsers are you seeing the problem on? Firefox ### Operating System Windows 11
GiteaMirror added the buggoal templates labels 2026-04-10 18:02:01 -05:00
Author
Owner

@thennekx commented on GitHub (Mar 6, 2024):

Could it be that the fix is as simple as moving the line
0e0d960cd4/packages/loot-core/src/server/budget/goaltemplates.ts (L225)
inside the loop
0e0d960cd4/packages/loot-core/src/server/budget/goaltemplates.ts (L229)

<!-- gh-comment-id:1981047384 --> @thennekx commented on GitHub (Mar 6, 2024): Could it be that the fix is as simple as moving the line https://github.com/actualbudget/actual/blob/0e0d960cd41ad711d650289ce912ae7652e3d46b/packages/loot-core/src/server/budget/goaltemplates.ts#L225 inside the loop https://github.com/actualbudget/actual/blob/0e0d960cd41ad711d650289ce912ae7652e3d46b/packages/loot-core/src/server/budget/goaltemplates.ts#L229
Author
Owner

@youngcw commented on GitHub (Mar 6, 2024):

It had been decided when that template was implemented to not recalculate the available funds value at each priority level. That way it was more obvious what value would be used since it was a value that the user could actually see, unlike the to budget between priority levels.

<!-- gh-comment-id:1981219291 --> @youngcw commented on GitHub (Mar 6, 2024): It had been decided when that template was implemented to not recalculate the available funds value at each priority level. That way it was more obvious what value would be used since it was a value that the user could actually see, unlike the to budget between priority levels.
Author
Owner

@thennekx commented on GitHub (Mar 6, 2024):

Thanks for the insight, I guess it cannot be considered a bug then, but rather an inconvenience.
This approach is very logical when using specific income categories, like previous all income, they do not change during runtime.
For the "available funds" keyword, it does not make so much sense to me in combination with priorities, as you know this changes when the budget is being applied using priorities.

If this approach is kept (which i can understand), I wonder if a specific keyword could be added that can achieve this behavior.
Please let me know your thoughts.

Some background on my issue i am having with the current approach:
I have my budget split-up in multiple groups, with descending importance, this is where the priorities come in.
When running the monthly apply budget this will yield a higher budget for less important categories than if i manually apply it per priority (see workaround below).
My lowest priorities are set to only 1 percent, so i cannot go lower to reduce the budget they receive. This results in my budget being eaten from my saving category that uses the remainder without manual intervention. This essentially breaks the monthly apply budget for me.
At the moment there is no way to achieve said behavior, which is what i believe could/should be handled with the priorities.

For anyone facing the same issue, my workaround below:
Run the monthly template apply, then reset the budget of the lower priorities and run it again, and repeat again until all priority levels are filled.

<!-- gh-comment-id:1981368154 --> @thennekx commented on GitHub (Mar 6, 2024): Thanks for the insight, I guess it cannot be considered a bug then, but rather an inconvenience. This approach is very logical when using specific income categories, like previous all income, they do not change during runtime. For the "available funds" keyword, it does not make so much sense to me in combination with priorities, as you know this changes when the budget is being applied using priorities. If this approach is kept (which i can understand), I wonder if a specific keyword could be added that can achieve this behavior. Please let me know your thoughts. Some background on my issue i am having with the current approach: I have my budget split-up in multiple groups, with descending importance, this is where the priorities come in. When running the monthly apply budget this will yield a higher budget for less important categories than if i manually apply it per priority (see workaround below). My lowest priorities are set to only 1 percent, so i cannot go lower to reduce the budget they receive. This results in my budget being eaten from my saving category that uses the remainder without manual intervention. This essentially breaks the monthly apply budget for me. At the moment there is no way to achieve said behavior, which is what i believe could/should be handled with the priorities. For anyone facing the same issue, my workaround below: Run the monthly template apply, then reset the budget of the lower priorities and run it again, and repeat again until all priority levels are filled.
Author
Owner

@youngcw commented on GitHub (Mar 6, 2024):

Ill close this for now. Feel free to put in a feature request for an update.

<!-- gh-comment-id:1981786953 --> @youngcw commented on GitHub (Mar 6, 2024): Ill close this for now. Feel free to put in a feature request for an update.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/actual#7904