[Docs]: Template "up to" not working as documented #2768

Open
opened 2026-02-28 20:27:13 -06:00 by GiteaMirror · 2 comments
Owner

Originally created by @aescgar on GitHub (Jan 4, 2026).

Verified issue does not already exist?

  • I have searched and found no existing issue

What happened?

PROBLEM 1

In the documentation (https://actualbudget.org/docs/experimental/goal-templates), it gives these two side-by-side examples of using the "up to" template:

Expected budgeted amount is 200 Expected maximum category balance is 200
#template 300
#template-1 150 up to 200

Expected budgeted amount is 450 No maximum category balance exists
#template 150 up to 500
#template-1 300

My understanding of this is that if the "up to" template is placed second, it becomes the expected maximum category balance. If the "up to" is placed first and followed by a separate template to add funds to the category, then "no maximum" is enforced on the second template line, and it is added to the category regardless of the balance. However, in practice, this does not work.

The documentation says that the second example results in $450 being added, with the $300 being added even if the balance has reached $500 or more. When I test this, contrary to the documentation, if the $150 pushes the balance to $500, the $300 does NOT get added. I believe the documentation should be left as-is as this is a valuable feature. For instance, I may want to add $150 on template priority 0 only if the balance is below $500. Then, under a different priority, I may want to add more funds.

PROBLEM 2

Take this example:
#template 50
#template-1 50 up to 100 hold

This is intended to add $50 to a category in priority 0. Then, if the balance is under $100, it should add another $50. In any case, if the balance goes over $100, the priority 1 "up to" should not reduce the balance to $100 because of the "hold." When testing, if the balance is $150 BEFORE going into the current month, it remains at $150 (does not add the priority 0 $50 but at least does respect the "hold"). If the balance is $100 going into the current month, the priority 0 template should add $50, bringing it to $150, then it should "hold" there. Instead, it holds at only $100 and does not keep the $50 that should have been added on priority 0.

Originally created by @aescgar on GitHub (Jan 4, 2026). ### Verified issue does not already exist? - [x] I have searched and found no existing issue ### What happened? **PROBLEM 1** In the documentation (https://actualbudget.org/docs/experimental/goal-templates), it gives these two side-by-side examples of using the "up to" template: **Expected budgeted amount is 200 Expected maximum category balance is 200** #template 300 #template-1 150 up to 200 **Expected budgeted amount is 450 No maximum category balance exists** #template 150 up to 500 #template-1 300 My understanding of this is that if the "up to" template is placed second, it becomes the expected maximum category balance. If the "up to" is placed first and followed by a separate template to add funds to the category, then "no maximum" is enforced on the second template line, and it is added to the category regardless of the balance. However, in practice, this does not work. The documentation says that the second example results in $450 being added, with the $300 being added even if the balance has reached $500 or more. When I test this, contrary to the documentation, if the $150 pushes the balance to $500, the $300 does NOT get added. I believe the documentation should be left as-is as this is a valuable feature. For instance, I may want to add $150 on template priority 0 only if the balance is below $500. Then, under a different priority, I may want to add more funds. **PROBLEM 2** Take this example: #template 50 #template-1 50 up to 100 hold This is intended to add $50 to a category in priority 0. Then, if the balance is under $100, it should add another $50. In any case, if the balance goes over $100, the priority 1 "up to" should not reduce the balance to $100 because of the "hold." When testing, if the balance is $150 BEFORE going into the current month, it remains at $150 (does not add the priority 0 $50 but at least does respect the "hold"). If the balance is $100 going into the current month, the priority 0 template should add $50, bringing it to $150, then it should "hold" there. Instead, it holds at only $100 and does not keep the $50 that should have been added on priority 0.
Author
Owner

@Juulz commented on GitHub (Jan 4, 2026):

From the docs:

If any single template contains an up to, the whole category will be subject to that limit even if there are later templates and priorities. This excludes remainders which will run after the limit is applied.

Expected budgeted amount is 450 No maximum category balance exists #template 150 up to 500 #template-1 300

These two statements are in conflict!

I believe ANY up to is enforced, no matter where it is, so the second statement would be false and the docs should be changed.

@Juulz commented on GitHub (Jan 4, 2026): From the docs: > If any single template contains an up to, the whole category will be subject to that limit even if there are later templates and priorities. This excludes remainders which will run after the limit is applied. > Expected budgeted amount is 450 No maximum category balance exists `#template 150 up to 500 #template-1 300` These two statements are in conflict! I believe **ANY** up to is enforced, no matter where it is, so the second statement would be false and the docs should be changed.
Author
Owner

@aescgar commented on GitHub (Jan 5, 2026):

I agree with your assessment of the incorrect documentation, but I believe the implementation of "up to" should be different, if you are correct, as this provides a solution to a very real use-case, as demonstrated in my initial post. Would it not be beneficial to enable "up to" to just apply to the line on which it is found? For instance "50 up to 300" means just that: add $50 to the category up to the point the category becomes $300, regardless of what templates may be above or below that. I assumed this was how it worked and would add the "up to" portion to each template line as needed.

There is no reason for the "up to" on one template line to affect other templates. It seems counterintuitive, removes a potential feature, and actually seems to add complexity when the logic flow could just apply template commands line-by-line.

I suppose this would also potentially address my second problem with the "hold" example?

@aescgar commented on GitHub (Jan 5, 2026): I agree with your assessment of the incorrect documentation, but I believe the implementation of "up to" should be different, if you are correct, as this provides a solution to a very real use-case, as demonstrated in my initial post. Would it not be beneficial to enable "up to" to just apply to the line on which it is found? For instance "50 up to 300" means just that: add $50 to the category up to the point the category becomes $300, regardless of what templates may be above or below that. I assumed this was how it worked and would add the "up to" portion to each template line as needed. There is no reason for the "up to" on one template line to affect other templates. It seems counterintuitive, removes a potential feature, and actually seems to add complexity when the logic flow could just apply template commands line-by-line. I suppose this would also potentially address my second problem with the "hold" example?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/actual#2768