[PR #5295] [MERGED] [Goals] upgrade week template to be a periodic template #5864

Closed
opened 2026-02-28 21:20:04 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/actualbudget/actual/pull/5295
Author: @youngcw
Created: 7/5/2025
Status: Merged
Merged: 7/8/2025
Merged by: @youngcw

Base: masterHead: youngcw/periodic-template


📝 Commits (4)

📊 Changes

9 files changed (+152 additions, -44 deletions)

View changed files

📝 packages/desktop-client/src/components/budget/goals/constants.ts (+2 -2)
📝 packages/desktop-client/src/components/budget/goals/editor/WeekAutomation.tsx (+3 -3)
📝 packages/desktop-client/src/components/budget/goals/editor/WeekAutomationReadOnly.tsx (+2 -2)
📝 packages/desktop-client/src/components/budget/goals/reducer.ts (+7 -4)
📝 packages/loot-core/src/server/budget/category-template-context.test.ts (+70 -10)
📝 packages/loot-core/src/server/budget/category-template-context.ts (+46 -14)
📝 packages/loot-core/src/server/budget/goal-template.pegjs (+9 -5)
📝 packages/loot-core/src/types/models/templates.ts (+7 -4)
upcoming-release-notes/5295.md (+6 -0)

📄 Description

resolves #3953

I extended the 'week' type template to be periodic with selectable periods of daily, weekly, monthly, and yearly.

I had to modify the existing template gui stuff to get the typecheck happy. Hopefully I didn't break anything there.

Examples:
#template 100 repeat every day starting 2025-01-01
#template 100 repeat every 10 days starting 2025-01-01
#template 100 repeat every 6 weeks starting 2025-01-01
#template 100 repeat every week starting 2025-01-01
#template 100 repeat every 3 months starting 2025-01-01
#template 100 repeat every year starting 2025-01-01
#template 100 repeat every 2 years starting 2025-01-01

as a side note, this template probably could be used as the basic template for when GUI's get made. Its nearly a superset of everthing the simple template can do, but includes extra features. Its a pain to add the extra information in a text note, but would be trivial for a gui to throw in when saving a template.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/actualbudget/actual/pull/5295 **Author:** [@youngcw](https://github.com/youngcw) **Created:** 7/5/2025 **Status:** ✅ Merged **Merged:** 7/8/2025 **Merged by:** [@youngcw](https://github.com/youngcw) **Base:** `master` ← **Head:** `youngcw/periodic-template` --- ### 📝 Commits (4) - [`f82f7a1`](https://github.com/actualbudget/actual/commit/f82f7a1a89015c19102585257fc192878315e290) upgrade week template to periodic template - [`aa46f4c`](https://github.com/actualbudget/actual/commit/aa46f4c62bfb3278fec1b0170be2da9db5dc11d3) note - [`4913bee`](https://github.com/actualbudget/actual/commit/4913beebb905c851b4dba6cf24e997f550d95a74) do it right - [`e13eda7`](https://github.com/actualbudget/actual/commit/e13eda764daa6de0035702ce7e2700e7d74389bb) tabs ### 📊 Changes **9 files changed** (+152 additions, -44 deletions) <details> <summary>View changed files</summary> 📝 `packages/desktop-client/src/components/budget/goals/constants.ts` (+2 -2) 📝 `packages/desktop-client/src/components/budget/goals/editor/WeekAutomation.tsx` (+3 -3) 📝 `packages/desktop-client/src/components/budget/goals/editor/WeekAutomationReadOnly.tsx` (+2 -2) 📝 `packages/desktop-client/src/components/budget/goals/reducer.ts` (+7 -4) 📝 `packages/loot-core/src/server/budget/category-template-context.test.ts` (+70 -10) 📝 `packages/loot-core/src/server/budget/category-template-context.ts` (+46 -14) 📝 `packages/loot-core/src/server/budget/goal-template.pegjs` (+9 -5) 📝 `packages/loot-core/src/types/models/templates.ts` (+7 -4) ➕ `upcoming-release-notes/5295.md` (+6 -0) </details> ### 📄 Description resolves #3953 I extended the 'week' type template to be periodic with selectable periods of daily, weekly, monthly, and yearly. I had to modify the existing template gui stuff to get the typecheck happy. Hopefully I didn't break anything there. Examples: `#template 100 repeat every day starting 2025-01-01` `#template 100 repeat every 10 days starting 2025-01-01` `#template 100 repeat every 6 weeks starting 2025-01-01` `#template 100 repeat every week starting 2025-01-01` `#template 100 repeat every 3 months starting 2025-01-01` `#template 100 repeat every year starting 2025-01-01` `#template 100 repeat every 2 years starting 2025-01-01` as a side note, this template probably could be used as the basic template for when GUI's get made. Its nearly a superset of everthing the simple template can do, but includes extra features. Its a pain to add the extra information in a text note, but would be trivial for a gui to throw in when saving a template. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-02-28 21:20:04 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/actual#5864