[GH-ISSUE #8138] [Bug]: Balance Cap in UI Budget Automations: Two Bugs with Weekly "up to" Template Generation #117677

Closed
opened 2026-06-11 13:07:37 -05:00 by GiteaMirror · 2 comments
Owner

Originally created by @remyayad on GitHub (Jun 7, 2026).
Original GitHub issue: https://github.com/actualbudget/actual/issues/8138

What happened?

When configuring a Balance Cap on a weekly Fixed Amount automation, two bugs occur:

  1. The balance cap's starting date is generated as undefined by default, causing the budgeted amount to drop to zero.
  2. Even after the undefined date is resolved, the cap's starting date defaults to the current date rather than the automation's own starting date, making it impossible to apply the cap retroactively via the UI.

How can we reproduce the issue?

Bug 1 - starting undefined on Balance Cap

  1. Create a new Fixed Amount automation: $50 every week starting 2026-01-01
  2. Verify this works correctly - for January 2026 it projects $250 (2026-01-01 is a Thursday and there are 5 Thursdays in Jan 2026) :
Image
  1. Add a Balance Cap, set the period to weekly.
  2. Observe that the budgeted amount drops to $0.
Image
  1. Inspect the generated notes template - the balance cap line reads:
    #template-1 50 repeat every 1 weeks starting 2026-01-01
    #template O up to 85 per week starting undefined
Image

Workaround: Manually open the day-of-week dropdown in the Balance Cap and reselect the same day of the week (or any other day of the week). This triggers the date to be captured properly, changing starting undefined to starting 2026-06-07.

Image Image

Bug 2 - Balance Cap starting date defaults to corresponding day of day of the week in current week, not the automation's starting date

  1. After applying the workaround above (reselecting the day of the week), the generated template becomes:
    #template 50 repeat every 1 weeks starting 2026-01-01
    #template 0 up to 85 per week starting 2026-06-07

  2. Because the balance cap's starting date is 2026-06-07 (today) rather than 2026-01-01 (the automation's starting date), the cap does not apply to any months prior to June 2026.

  3. There is no way to set a custom starting date for the balance cap in the UI.

Expected: The balance cap's starting date should default to match the Fixed Amount automation's starting date (2026-01-01), or at minimum allow the user to set it manually.

Workaround:

  1. Note the generated template text.
  2. Unmigrate / switch to notes-based templates.
  3. Manually edit starting 2026-06-07starting 2026-01-01.
  4. Re-migrate back to UI automations.

Expected Final Template

#template 50 repeat every 1 weeks starting 2026-01-01
#template 0 up to 85 per week starting 2026-01-01


Impact

  • Balance Cap on weekly automations is effectively broken by default (Bug 1).
  • Even after resolving Bug 1, retroactive balance caps are impossible to configure through the UI (Bug 2), requiring users to manually edit the raw template notes as a workaround.

Where are you hosting Actual?

Docker

What browsers are you seeing the problem on?

Other

Operating System

Mac OSX

Originally created by @remyayad on GitHub (Jun 7, 2026). Original GitHub issue: https://github.com/actualbudget/actual/issues/8138 ### What happened? When configuring a **Balance Cap** on a weekly Fixed Amount automation, two bugs occur: 1. The balance cap's `starting` date is generated as `undefined` by default, causing the budgeted amount to drop to zero. 2. Even after the `undefined` date is resolved, the cap's starting date defaults to the current date rather than the automation's own starting date, making it impossible to apply the cap retroactively via the UI. ### How can we reproduce the issue? ### Bug 1 - `starting undefined` on Balance Cap 1. Create a new Fixed Amount automation: `$50 every week starting 2026-01-01` 2. Verify this works correctly - for January 2026 it projects **$250** (2026-01-01 is a Thursday and there are 5 Thursdays in Jan 2026) : <img width="953" height="755" alt="Image" src="https://github.com/user-attachments/assets/b09505b2-3c6b-4906-96cd-61ca9f8f5f2c" /> 3. Add a Balance Cap, set the period to **weekly**. 4. Observe that the budgeted amount **drops to $0**. <img width="957" height="758" alt="Image" src="https://github.com/user-attachments/assets/96a1b0a1-9a3d-47e8-ab36-438c8087094e" /> 5. Inspect the generated notes template - the balance cap line reads: `#template-1 50 repeat every 1 weeks starting 2026-01-01` `#template O up to 85 per week starting undefined` <img width="922" height="735" alt="Image" src="https://github.com/user-attachments/assets/8bffec08-17a9-45c9-8a1e-0809cd3d4e8c" /> **Workaround:** Manually open the day-of-week dropdown in the Balance Cap and reselect the same day of the week (or any other day of the week). This triggers the date to be captured properly, changing `starting undefined` to `starting 2026-06-07`. <img width="954" height="756" alt="Image" src="https://github.com/user-attachments/assets/33316196-915d-40fa-a05a-f373a2e9e128" /> <img width="913" height="729" alt="Image" src="https://github.com/user-attachments/assets/2115e1f4-5372-42a0-95fc-4ce2b37f8ebd" /> --- ### Bug 2 - Balance Cap starting date defaults to corresponding day of day of the week in current week, not the automation's starting date 1. After applying the workaround above (reselecting the day of the week), the generated template becomes: `#template 50 repeat every 1 weeks starting 2026-01-01` `#template 0 up to 85 per week starting 2026-06-07` 2. Because the balance cap's starting date is `2026-06-07` (today) rather than `2026-01-01` (the automation's starting date), the cap does not apply to any months prior to June 2026. 3. There is no way to set a custom starting date for the balance cap in the UI. **Expected:** The balance cap's starting date should default to match the Fixed Amount automation's starting date (`2026-01-01`), or at minimum allow the user to set it manually. **Workaround:** 1. Note the generated template text. 2. Unmigrate / switch to notes-based templates. 3. Manually edit `starting 2026-06-07` → `starting 2026-01-01`. 4. Re-migrate back to UI automations. --- ## Expected Final Template `#template 50 repeat every 1 weeks starting 2026-01-01` `#template 0 up to 85 per week starting 2026-01-01` --- ## Impact - Balance Cap on weekly automations is effectively **broken by default** (Bug 1). - Even after resolving Bug 1, retroactive balance caps are **impossible to configure through the UI** (Bug 2), requiring users to manually edit the raw template notes as a workaround. ### Where are you hosting Actual? Docker ### What browsers are you seeing the problem on? Other ### Operating System Mac OSX
GiteaMirror added the bug label 2026-06-11 13:07:37 -05:00
Author
Owner

@coderabbitai[bot] commented on GitHub (Jun 7, 2026):

🔗 Related PRs

actualbudget/actual#7832 - automation UI: various tweaks and fixes [merged]
actualbudget/actual#7863 - [Docs] UI Budget automations & month-end cleanup [merged]
actualbudget/actual#7881 - automation UI: add increase/decrease functionality [merged]
actualbudget/actual#8082 - automation UI: rework balance cap and fix error when clearing fields [merged]
actualbudget/actual#8085 - [AI] Fix incorrect schedule value when saving full amount [merged]


📝 Issue Planner

Check the box below or use the @coderabbitai plan command to generate an implementation plan and prompts that you can use with your favorite coding assistant.

  • Create Plan

🧪 Issue enrichment is currently in open beta.

You can configure auto-planning by selecting labels in the issue_enrichment configuration.

To disable automatic issue enrichment, add the following to your .coderabbit.yaml:

issue_enrichment:
  auto_enrich:
    enabled: false

💬 Have feedback or questions? Drop into our discord!

<!-- gh-comment-id:4643223208 --> @coderabbitai[bot] commented on GitHub (Jun 7, 2026): <!-- This is an auto-generated issue plan by CodeRabbit --> <details> <summary>🔗 Related PRs</summary> actualbudget/actual#7832 - automation UI: various tweaks and fixes [merged] actualbudget/actual#7863 - [Docs] UI Budget automations & month-end cleanup [merged] actualbudget/actual#7881 - automation UI: add increase/decrease functionality [merged] actualbudget/actual#8082 - automation UI: rework balance cap and fix error when clearing fields [merged] actualbudget/actual#8085 - [AI] Fix incorrect schedule value when saving full amount [merged] </details> --- <details> <summary>📝 Issue Planner</summary> <sub>Check the box below or use the `@coderabbitai plan` command to generate an implementation plan and prompts that you can use with your favorite coding assistant.</sub> - [ ] <!-- {"checkboxId": "8d4f2b9c-3e1a-4f7c-a9b2-d5e8f1c4a7b9"} --> Create Plan </details> --- <details> <summary> 🧪 Issue enrichment is currently in open beta.</summary> You can configure auto-planning by selecting labels in the issue_enrichment configuration. To disable automatic issue enrichment, add the following to your `.coderabbit.yaml`: ```yaml issue_enrichment: auto_enrich: enabled: false ``` </details> 💬 Have feedback or questions? Drop into our [discord](https://discord.gg/coderabbit)!
Author
Owner

@youngcw commented on GitHub (Jun 7, 2026):

Use the dedicated feedback ticket directly. We don't need the separate ticket

<!-- gh-comment-id:4643495371 --> @youngcw commented on GitHub (Jun 7, 2026): Use the dedicated feedback ticket directly. We don't need the separate ticket
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/actual#117677