[GH-ISSUE #3820] [Bug]: Template "repeat every year" doesn't reset at target #50705

Open
opened 2026-04-30 16:05:13 -05:00 by GiteaMirror · 5 comments
Owner

Originally created by @pwinnski on GitHub (Nov 11, 2024).
Original GitHub issue: https://github.com/actualbudget/actual/issues/3820

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 have a template defined as "#template $30 by 2024-11 repeat every year"

In November, it correctly assigns 2.50 to the category. In December, it assigns 0, because the transaction that reduces the category to 0 hasn't happened yet. This seems to suggest templates aren't very useful for future months.

I would expect that either December would behave as if the balance were 0, and assign $2.50, or that there would something I could add to the template rule to make that happen.

Where are you hosting Actual?

NAS

What browsers are you seeing the problem on?

Other

Operating System

Mac OSX

Originally created by @pwinnski on GitHub (Nov 11, 2024). Original GitHub issue: https://github.com/actualbudget/actual/issues/3820 ### 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 have a template defined as "#template $30 by 2024-11 repeat every year" In November, it correctly assigns 2.50 to the category. In December, it assigns 0, because the transaction that reduces the category to 0 hasn't happened yet. This seems to suggest templates aren't very useful for future months. I would expect that either December would behave as if the balance were 0, and assign $2.50, or that there would something I could add to the template rule to make that happen. ### Where are you hosting Actual? NAS ### What browsers are you seeing the problem on? Other ### Operating System Mac OSX
GiteaMirror added the goal templatesbug labels 2026-04-30 16:05:14 -05:00
Author
Owner

@pwinnski commented on GitHub (Nov 11, 2024):

This also affects a template I have defined as "#template 139.64 by 2024-09 repeat every 3 months"

It is fine through December (now), but in January and subsequently it budgets 0 because there's already 139.64 there, and will be until December 19 or so.

<!-- gh-comment-id:2468480157 --> @pwinnski commented on GitHub (Nov 11, 2024): This also affects a template I have defined as "#template 139.64 by 2024-09 repeat every 3 months" It is fine through December (now), but in January and subsequently it budgets 0 because there's already 139.64 there, and will be until December 19 or so.
Author
Owner

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

Would it seem reasonable to ignore the leftover balance for just the first month of the new period? At some point the full balance needs to be considered by the template to not perpetually over budget the category if you don't use the full amount in the previous period.

The other option would be to not use a 'by' template and just use something like #template 2.50, optionally with a limit. That way you always budget that amount.

<!-- gh-comment-id:2470818466 --> @youngcw commented on GitHub (Nov 12, 2024): Would it seem reasonable to ignore the leftover balance for just the first month of the new period? At some point the full balance needs to be considered by the template to not perpetually over budget the category if you don't use the full amount in the previous period. The other option would be to not use a 'by' template and just use something like `#template 2.50`, optionally with a limit. That way you always budget that amount.
Author
Owner

@pwinnski commented on GitHub (Nov 12, 2024):

That seems reasonable, I think. Can't expect the software to read minds!

I did set one category to use a fixed template amount, but I have several that don't evenly divide by 3 or 12, so the allocated amount varies by a penny to hit the total!

<!-- gh-comment-id:2471008084 --> @pwinnski commented on GitHub (Nov 12, 2024): That seems reasonable, I think. Can't expect the software to read minds! I did set one category to use a fixed template amount, but I have several that don't evenly divide by 3 or 12, so the allocated amount varies by a penny to hit the total!
Author
Owner

@youngcw commented on GitHub (Nov 13, 2024):

Another option could be to use something like #template 2.60 up to 30 That way you won't end up being just a tiny bit short, because you budgeted just a little extra each month.

edit: never mind. You would have basically the same issue as the by template

<!-- gh-comment-id:2474318062 --> @youngcw commented on GitHub (Nov 13, 2024): Another option could be to use something like `#template 2.60 up to 30` That way you won't end up being just a tiny bit short, because you budgeted just a little extra each month. edit: never mind. You would have basically the same issue as the by template
Author
Owner

@benjamin-owen commented on GitHub (Jan 2, 2025):

I'm not sure if this is the same issue, but this behavior also affects categories which have a combination of different due dates. For example, I made a test budget with a gym membership category. This category has a $20 template repeating every other week, and a $10 template repeating every 6 months (simulating gym membership fees and bi-annual dues). In the budget, $61.67 is budgeted for January (correct, $20 * 3 weeks + $10 / 6 months). However, budgeting for February, only $40 is budgeted. I think the logic is checking if the $10 is already present (it is, but it's really allocated for the bi-weekly payments, and only $1.67 is budgeted for the bi-annual payment), and skips allocating the additional $1.67.

I'm not sure if there's an easy way to handle these cases without tracking each #template line in a category separately. Maybe using schedule templates would allow for these to be calculated correctly, but #3892 may need to be fixed first.

<!-- gh-comment-id:2567813224 --> @benjamin-owen commented on GitHub (Jan 2, 2025): I'm not sure if this is the same issue, but this behavior also affects categories which have a combination of different due dates. For example, I made a test budget with a gym membership category. This category has a $20 template repeating every other week, and a $10 template repeating every 6 months (simulating gym membership fees and bi-annual dues). In the budget, $61.67 is budgeted for January (correct, $20 * 3 weeks + $10 / 6 months). However, budgeting for February, only $40 is budgeted. I think the logic is checking if the $10 is already present (it is, but it's really allocated for the bi-weekly payments, and only $1.67 is budgeted for the bi-annual payment), and skips allocating the additional $1.67. I'm not sure if there's an easy way to handle these cases without tracking each #template line in a category separately. Maybe using schedule templates would allow for these to be calculated correctly, but #3892 may need to be fixed first.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/actual#50705