[GH-ISSUE #8139] [Bug]: UI Budget Automations: Unmigrating a Fixed Amount + Balance Cap Creates a Duplicate Zero-Amount Template #117678

Closed
opened 2026-06-11 13:07:41 -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/8139

What happened?

When a Fixed Amount automation with a Balance Cap is saved via the UI and then unmigrated to text-based templates, the balance cap is exposed as a separate #template 0 line. Re-migrating back to UI automations then creates a duplicate second automation with a value of zero, corrupting the configuration.

How can we reproduce the issue?

  1. Create a Fixed Amount automation with a Balance Cap via the UI and Save.
Image
  1. Re-open the automation form and click Unmigrate to switch to text-based templates.
  2. Observe that the notes now show two separate template lines - the fixed amount line and a separate #template 0 line representing the balance cap :
Image
  1. Re-open the UI automation form (re-migrate).
  2. Observe that a second automation is created with a value of $0, in addition to the original Fixed Amount automation.
Image

Expected Behavior

The UI should treat a Fixed Amount + Balance Cap as a single atomic automation. Unmigrating and re-migrating should produce the same single automation, not two.


Actual Behavior

  • Unmigrating exposes the balance cap as a standalone #template 0 line.
  • Re-migrating interprets that line as an independent automation, resulting in a duplicate $0 automation being added alongside the original.

Impact

The unmigrate → re-migrate round-trip is not lossless. This is particularly problematic because:

  • The unmigrate/re-migrate flow is currently the only workaround for fixing the balance cap starting date bug (see related issue #8138).

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/8139 ### What happened? When a **Fixed Amount** automation with a **Balance Cap** is saved via the UI and then unmigrated to text-based templates, the balance cap is exposed as a separate `#template 0` line. Re-migrating back to UI automations then creates a **duplicate second automation** with a value of zero, corrupting the configuration. ### How can we reproduce the issue? 1. Create a Fixed Amount automation with a Balance Cap via the UI and **Save**. <img width="957" height="755" alt="Image" src="https://github.com/user-attachments/assets/07e8a380-35c3-4893-b202-80c915e0b063" /> 2. Re-open the automation form and click **Unmigrate** to switch to text-based templates. 3. Observe that the notes now show **two separate template lines** - the fixed amount line and a separate `#template 0` line representing the balance cap : <img width="911" height="705" alt="Image" src="https://github.com/user-attachments/assets/c0495f9b-6ba8-4365-8169-e2d3c60d062b" /> 4. Re-open the UI automation form (re-migrate). 5. Observe that a **second automation is created** with a value of `$0`, in addition to the original Fixed Amount automation. <img width="957" height="756" alt="Image" src="https://github.com/user-attachments/assets/8e1850dc-41f1-4885-a4c2-c8a1c0d06c87" /> --- ## Expected Behavior The UI should treat a Fixed Amount + Balance Cap as a **single atomic automation**. Unmigrating and re-migrating should produce the same single automation, not two. --- ## Actual Behavior - Unmigrating exposes the balance cap as a standalone `#template 0` line. - Re-migrating interprets that line as an independent automation, resulting in a duplicate `$0` automation being added alongside the original. --- ## Impact The unmigrate → re-migrate round-trip is **not lossless**. This is particularly problematic because: - The unmigrate/re-migrate flow is currently the **only workaround** for fixing the balance cap starting date bug (see related [issue #8138](https://github.com/actualbudget/actual/issues/8138)). ### 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:41 -05:00
Author
Owner

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

🔗 Related PRs

actualbudget/actual#7823 - automation UI: add spend from functionality [merged]
actualbudget/actual#7832 - automation UI: various tweaks and fixes [merged]
actualbudget/actual#7863 - [Docs] UI Budget automations & month-end cleanup [merged]
actualbudget/actual#8082 - automation UI: rework balance cap and fix error when clearing fields [merged]
actualbudget/actual#8088 - add warning when schedule/save by automation priorities don't match [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:4643446051 --> @coderabbitai[bot] commented on GitHub (Jun 7, 2026): <!-- This is an auto-generated issue plan by CodeRabbit --> <details> <summary>🔗 Related PRs</summary> actualbudget/actual#7823 - automation UI: add spend from functionality [merged] actualbudget/actual#7832 - automation UI: various tweaks and fixes [merged] actualbudget/actual#7863 - [Docs] UI Budget automations & month-end cleanup [merged] actualbudget/actual#8082 - automation UI: rework balance cap and fix error when clearing fields [merged] actualbudget/actual#8088 - add warning when schedule/save by automation priorities don't match [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):

Please use the dedicated feedback ticket.

<!-- gh-comment-id:4643490958 --> @youngcw commented on GitHub (Jun 7, 2026): Please use the dedicated feedback ticket.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/actual#117678