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

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

Open
2 tasks done
pwinnski opened this issue Nov 11, 2024 · 5 comments
Open
2 tasks done

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

pwinnski opened this issue Nov 11, 2024 · 5 comments
Labels
bug Something isn't working goal templates Related to the experimental goal templates feature

Comments

@pwinnski
Copy link

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

@pwinnski pwinnski added the bug Something isn't working label Nov 11, 2024
@youngcw youngcw added the goal templates Related to the experimental goal templates feature label Nov 11, 2024
@pwinnski
Copy link
Author

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.

@youngcw
Copy link
Member

youngcw commented 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.

@pwinnski
Copy link
Author

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!

@youngcw
Copy link
Member

youngcw commented 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

@benjamin-owen
Copy link

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 up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working goal templates Related to the experimental goal templates feature
Projects
None yet
Development

No branches or pull requests

3 participants