[Bug]: Budget goal templates for "up to" ceased working as expected #1663

Closed
opened 2026-02-28 19:50:14 -06:00 by GiteaMirror · 8 comments
Owner

Originally created by @Arnoud-B on GitHub (Dec 11, 2024).

Verified issue does not already exist?

  • I have searched and found no existing issue
  • I will be providing steps how to reproduce the bug (in most cases this will also mean uploading a demo budget file)

What happened?

I had the following budget goal templates for a category:

#template 1000
#template up to 200

This has ensured for months that the budget for this category would always be 200 whenever the budget template was applied, unless the amount spent was above 1000.

After updating to the latest Actual, this doesn't work anymore.

Situation:

Month Budgeted Spent Balance
October 200
November -509.25 -309.25
December -67.88 -67.88
January 0 0

Now when I apply the budget template to November through January, the result is this:

Month Budgeted Spent Balance
October 200
November -509.25 -309.25
December 200 -67.88 132.12
January 67.88 0 200

While I would expect it to be like this:

Month Budgeted Spent Balance
October 200
November 509,25 -509.25 200
December 67.88 -67.88 200
January 0 0 200

I don't see any changes in the documentation.

Where are you hosting Actual?

Docker

What browsers are you seeing the problem on?

Safari

Operating System

Mac OSX

Originally created by @Arnoud-B on GitHub (Dec 11, 2024). ### Verified issue does not already exist? - [X] I have searched and found no existing issue - [X] I will be providing steps how to reproduce the bug (in most cases this will also mean uploading a demo budget file) ### What happened? I had the following budget goal templates for a category: ``` #template 1000 #template up to 200 ``` This has ensured for months that the budget for this category would always be 200 whenever the budget template was applied, unless the amount spent was above 1000. After updating to the latest Actual, this doesn't work anymore. Situation: | Month | Budgeted | Spent | Balance | | -------- | -------- | ------- | ------- | | October | | | 200 | | November | | -509.25 | -309.25 | | December | | -67.88 | -67.88 | | January | | 0 | 0 | Now when I apply the budget template to November through January, the result is this: | Month | Budgeted | Spent | Balance | | -------- | -------- | ------- | ------- | | October | | | 200 | | November | | -509.25 | -309.25 | | December | 200 | -67.88 | 132.12 | | January | 67.88 | 0 | 200 | While I would expect it to be like this: | Month | Budgeted | Spent | Balance | | -------- | -------- | ------- | ------- | | October | | | 200 | | November | 509,25 | -509.25 | 200 | | December | 67.88 | -67.88 | 200 | | January | 0 | 0 | 200 | I don't see any changes in the documentation. ### Where are you hosting Actual? Docker ### What browsers are you seeing the problem on? Safari ### Operating System Mac OSX
GiteaMirror added the bug label 2026-02-28 19:50:14 -06:00
Author
Owner

@youngcw commented on GitHub (Dec 11, 2024):

Can you use #template 1000 up to 200
or
#template 1000
#template 0 up to 200

The template code was recently rewritten to not be such a mess. The up to processing changes slightly, but Im surprised that yours no longer works

@youngcw commented on GitHub (Dec 11, 2024): Can you use `#template 1000 up to 200` or `#template 1000` `#template 0 up to 200` The template code was recently rewritten to not be such a mess. The up to processing changes slightly, but Im surprised that yours no longer works
Author
Owner

@youngcw commented on GitHub (Dec 11, 2024):

Oh, nevermind. I looked at your tables more closely. The templates look like they are working right. The category has 200 available each month and you spent it so the balance is what you are showing.

So for each of the months you showed the category balance was 200 before you spent anything. So if you add up balance+spent they all equal 200 which is expected.

@youngcw commented on GitHub (Dec 11, 2024): Oh, nevermind. I looked at your tables more closely. The templates look like they are working right. The category has 200 available each month and you spent it so the balance is what you are showing. So for each of the months you showed the category balance was 200 before you spent anything. So if you add up balance+spent they all equal 200 which is expected.
Author
Owner

@Arnoud-B commented on GitHub (Dec 11, 2024):

If the 2nd table is now what is expected, how am I supposed to write a template that ensures the balance is set to 200 after the template is applied? (for each month)

@Arnoud-B commented on GitHub (Dec 11, 2024): If the 2nd table is now what is expected, how am I supposed to write a template that ensures the balance is set to 200 after the template is applied? (for each month)
Author
Owner

@Arnoud-B commented on GitHub (Dec 12, 2024):

@youngcw Could you suggest how to achieve the expected outcome again?

@Arnoud-B commented on GitHub (Dec 12, 2024): @youngcw Could you suggest how to achieve the expected outcome again?
Author
Owner

@youngcw commented on GitHub (Dec 12, 2024):

I don' think you can with templates as is. What you were doing was a bug. Templates were designed to budget the same amount no matter when during the month they are applied (unless previous months had changed).

@youngcw commented on GitHub (Dec 12, 2024): I don' think you can with templates as is. What you were doing was a bug. Templates were designed to budget the same amount no matter when during the month they are applied (unless previous months had changed).
Author
Owner

@Arnoud-B commented on GitHub (Dec 12, 2024):

Thanks, I have changed my approach.

However, this introduced a new bug: When using #template up to 0, it doesn't remove any funds over 0, while the documentation states that it should. Should I report that separately?

@Arnoud-B commented on GitHub (Dec 12, 2024): Thanks, I have changed my approach. However, this introduced a new bug: When using `#template up to 0`, it doesn't remove any funds over 0, while the documentation states that it should. Should I report that separately?
Author
Owner

@youngcw commented on GitHub (Dec 12, 2024):

yes report that separately. If you can create a test budget and upload it to the issue that would also help a lot

@youngcw commented on GitHub (Dec 12, 2024): yes report that separately. If you can create a test budget and upload it to the issue that would also help a lot
Author
Owner

@Arnoud-B commented on GitHub (Dec 12, 2024):

Done.

@Arnoud-B commented on GitHub (Dec 12, 2024): [Done](https://github.com/actualbudget/actual/issues/3971).
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/actual#1663