[GH-ISSUE #7109] [Feature] #template schedule should budget toward the next occurrence, not overshoot #28767

Closed
opened 2026-04-18 05:30:50 -05:00 by GiteaMirror · 1 comment
Owner

Originally created by @mathisgauthey on GitHub (Mar 2, 2026).
Original GitHub issue: https://github.com/actualbudget/actual/issues/7109

Verified feature request does not already exist?

  • I have searched and found no existing issue

💻

  • Would you like to implement this feature?

Pitch: what problem are you trying to solve?

Hi,

Following this Discord discussion, I noticed that the schedule template behaves unexpectedly when a category already has funds assigned.

A schedule is defined by :

  • Name : The name of the schedule
  • Payee : The payee
  • Account : The impacted account
  • Amount : A positive or negative amount X
  • A recurrence : Every n months from a DATE to ANOTHER_DATE or forever. I know the recurrence can be defined as daily/weekly/monthly/yearly, but as we budget monthly the calculations bellow will use the month "currency"
  • A next occurrence : Typically, from now(), we could consider Y the next occurrence date based on the schedule recurrence rule.

The core issue is that the template does not account for what has already been assigned. Instead of checking whether the target amount X will be reached by date Y, it blindly adds X/n regardless of the current balance.

Example: Google Drive subscription

Image

Say I have a Google Drive schedule for 29.99€ that renews yearly, and I add #template schedule Google Drive to the category.

If I've already assigned 29.99€ to that category, running Overwrite with template still proposes adding 29.99/12€ on top. That's wrong: the goal is already met.

Image

Describe your ideal solution to this problem

Proposed solution

The template should calculate how much still needs to be saved to reach X € by date Y, and assign only the remaining amount for the current month. The logic breaks down into three cases, which will reuse that Google Drive example.

Case 1 : Nothing assigned yet, next occurrence in 12 months

  • Remaining to save: X €
  • Months until next occurrence: n=12
  • Monthly assignment: X / 12€

Case 2 : Already assigned X or more

Already assigned X or X+Z>X€, for a next occurrence in the future.

The monthly template should do nothing.

Case 3 : Partially funded, mid-way through the saving period

Example: next occurrence in 10 months, target is 30€, and 15€ has already been assigned (as if 2 months of saving have already happened).

  • Remaining to save: 30 - 15 = 15€
  • Months remaining: 10
  • Monthly assignment: 15 / 10 = 1.50€

This is the general formula: (X - already_assigned) / months_remaining, clamped to 0 if the goal is already met.

Teaching and learning

Why This Makes Sense

I think it makes sense from a following schedule sense.

A schedule is fundamentally just an amount X due on a recurring date Y. The template's job should be to help you reach X by Y, distributing the remaining gap across the remaining months, exactly like a savings goal.

The current behavior ignores what's already been set aside, which defeats the purpose of using templates to automate budgeting.

The docs should clarify that #template schedule works like a forward-looking savings calculator: it looks at the next occurrence, the amount due, and what's already assigned, then fills in only what's still needed for the current month.

A note about the "already funded" behavior (Case 2) would prevent confusion for users who manually assign money before running templates.

Originally created by @mathisgauthey on GitHub (Mar 2, 2026). Original GitHub issue: https://github.com/actualbudget/actual/issues/7109 ### Verified feature request does not already exist? - [x] I have searched and found no existing issue ### 💻 - [x] Would you like to implement this feature? ### Pitch: what problem are you trying to solve? Hi, Following this [Discord discussion](https://discord.com/channels/937901803608096828/1478132341409972395), I noticed that the schedule template behaves unexpectedly when a category already has funds assigned. A schedule is defined by : - Name : The name of the schedule - Payee : The payee - Account : The impacted account - Amount : A positive or negative amount `X` - A recurrence : Every `n` months from a `DATE` to `ANOTHER_DATE` or forever. *I know the recurrence can be defined as daily/weekly/monthly/yearly, but as we budget monthly the calculations bellow will use the month "currency"* - A next occurrence : Typically, from `now()`, we could consider `Y` the next occurrence date based on the schedule recurrence rule. The core issue is that the template does not account for what has already been assigned. Instead of checking whether the target amount `X` will be reached by date `Y`, it blindly adds `X/n` regardless of the current balance. Example: Google Drive subscription <img width="783" height="1180" alt="Image" src="https://github.com/user-attachments/assets/9385a8fd-49d2-4a4c-952b-e30e8c34b44c" /> Say I have a Google Drive schedule for 29.99€ that renews yearly, and I add `#template schedule Google Drive` to the category. If I've already assigned 29.99€ to that category, running `Overwrite with template` still proposes adding 29.99/12€ on top. That's wrong: **the goal is already met**. <img width="754" height="379" alt="Image" src="https://github.com/user-attachments/assets/1324433b-2e6b-458a-a714-5d9a98d9b956" /> ### Describe your ideal solution to this problem ## Proposed solution The template should calculate how much still needs to be saved to reach `X €` by date `Y`, and assign only the remaining amount for the current month. The logic breaks down into three cases, which will reuse that Google Drive example. ### Case 1 : Nothing assigned yet, next occurrence in 12 months - Remaining to save: `X €` - Months until next occurrence: `n=12` - Monthly assignment: `X / 12€` ### Case 2 : Already assigned X or more Already assigned `X` or `X+Z`>`X`€, for a next occurrence in the future. The monthly template should do nothing. ### Case 3 : Partially funded, mid-way through the saving period Example: next occurrence in 10 months, target is 30€, and 15€ has already been assigned (as if 2 months of saving have already happened). - Remaining to save: 30 - 15 = 15€ - Months remaining: 10 - Monthly assignment: 15 / 10 = 1.50€ This is the general formula: `(X - already_assigned) / months_remaining`, clamped to 0 if the goal is already met. ### Teaching and learning ## Why This Makes Sense I think it makes sense from a following schedule sense. A schedule is fundamentally just an amount `X` due on a recurring date `Y`. The template's job should be to help you reach `X` by `Y`, distributing the remaining gap across the remaining months, exactly like a savings goal. The current behavior ignores what's already been set aside, which defeats the purpose of using templates to automate budgeting. The docs should clarify that #template schedule works like a forward-looking savings calculator: it looks at the next occurrence, the amount due, and what's already assigned, then fills in only what's still needed for the current month. A note about the "already funded" behavior (Case 2) would prevent confusion for users who manually assign money before running templates.
GiteaMirror added the needs votesfeature labels 2026-04-18 05:30:50 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Mar 2, 2026):

Thanks for sharing your idea!

This repository uses a voting-based system for feature requests. While enhancement issues are automatically closed, we still welcome feature requests! The voting system helps us gauge community interest in potential features. We also encourage community contributions for any feature requests marked as needing votes (just post a comment first so we can help guide you toward a successful contribution).

The enhancement backlog can be found here: https://github.com/actualbudget/actual/issues?q=label%3A%22needs+votes%22+sort%3Areactions-%2B1-desc+

Don't forget to upvote the top comment with 👍!

<!-- gh-comment-id:3987079510 --> @github-actions[bot] commented on GitHub (Mar 2, 2026): :sparkles: Thanks for sharing your idea! :sparkles: This repository uses a voting-based system for feature requests. While enhancement issues are automatically closed, we still welcome feature requests! The voting system helps us gauge community interest in potential features. We also encourage community contributions for any feature requests marked as needing votes (just post a comment first so we can help guide you toward a successful contribution). The enhancement backlog can be found here: https://github.com/actualbudget/actual/issues?q=label%3A%22needs+votes%22+sort%3Areactions-%2B1-desc+ Don't forget to upvote the top comment with 👍! <!-- feature-auto-close-comment -->
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/actual#28767