[PR #3714] [CLOSED] [Goals] allow daily and weekly limits #19379

Closed
opened 2026-04-14 21:05:23 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/actualbudget/actual/pull/3714
Author: @youngcw
Created: 10/23/2024
Status: Closed

Base: masterHead: youngcw/up-to-weekly


📝 Commits (10+)

📊 Changes

12 files changed (+118 additions, -260 deletions)

View changed files

📝 packages/loot-core/src/server/budget/cleanup-template.ts (+1 -1)
📝 packages/loot-core/src/server/budget/cleanupParser.pegjs (+0 -0)
📝 packages/loot-core/src/server/budget/goals/goalsCopy.ts (+2 -22)
📝 packages/loot-core/src/server/budget/goals/goalsSimple.test.ts (+8 -64)
📝 packages/loot-core/src/server/budget/goals/goalsSimple.ts (+2 -15)
📝 packages/loot-core/src/server/budget/goals/goalsWeek.test.ts (+2 -93)
📝 packages/loot-core/src/server/budget/goals/goalsWeek.ts (+2 -20)
📝 packages/loot-core/src/server/budget/goaltemplates.ts (+63 -25)
📝 packages/loot-core/src/server/budget/template-notes.ts (+1 -1)
📝 packages/loot-core/src/server/budget/templateParser.pegjs (+19 -15)
📝 packages/loot-core/src/server/budget/types/templates.d.ts (+12 -4)
upcoming-release-notes/3714.md (+6 -0)

📄 Description

resolves #3711

This modifies the "limit" parser in templates to allow setting the limit to be monthly(current behavior, new default), weekly, or daily.

Ex.
#template up to 5 per day
#template up to 100 per week starting 2024-10-01
#template up to 50 per day hold
So instead of using the given limit amount as the per month limit, the amount can conditionally be used as a daily or weekly limit. The template code will calculate the proper monthly limit from that. This will work with all existing templates that support a limit.

The starting date acts the same here as the general weekly template. So give it a day and it will use that to figure out weeks.


🔄 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/3714 **Author:** [@youngcw](https://github.com/youngcw) **Created:** 10/23/2024 **Status:** ❌ Closed **Base:** `master` ← **Head:** `youngcw/up-to-weekly` --- ### 📝 Commits (10+) - [`c755ae3`](https://github.com/actualbudget/actual/commit/c755ae3c5fd8fbc6b596b3cfe51d1cf33f0a4351) clean up accidental commit - [`2765d23`](https://github.com/actualbudget/actual/commit/2765d238c354cde24ab829e3cbee9b21bc44b098) move - [`9b61984`](https://github.com/actualbudget/actual/commit/9b61984259ce6efd80f6e8c4007329135c90e688) add parser for limit periods - [`138d3bd`](https://github.com/actualbudget/actual/commit/138d3bd8c15a6ea275f5b7e575bd63d5ccdef9a9) start adding in limit periods - [`6e485bf`](https://github.com/actualbudget/actual/commit/6e485bfbfc2ed6948098d84f8c28cb5921caa29a) working daily - [`adea17c`](https://github.com/actualbudget/actual/commit/adea17c3cf650d1535fbf4d27c02a35f2762d728) weekly working, just need to use pref - [`713a3cf`](https://github.com/actualbudget/actual/commit/713a3cff60bc07fd898ee447828ad1846b14eab3) note - [`f22d55f`](https://github.com/actualbudget/actual/commit/f22d55fce841593da5574d8b90c9b9d634c99e6e) lint - [`7518472`](https://github.com/actualbudget/actual/commit/7518472fdd48f18ca63fb4867728325550e53059) types - [`741a6c4`](https://github.com/actualbudget/actual/commit/741a6c4447f5e0518d71dc905ed4441658cfbcac) tests ### 📊 Changes **12 files changed** (+118 additions, -260 deletions) <details> <summary>View changed files</summary> 📝 `packages/loot-core/src/server/budget/cleanup-template.ts` (+1 -1) 📝 `packages/loot-core/src/server/budget/cleanupParser.pegjs` (+0 -0) 📝 `packages/loot-core/src/server/budget/goals/goalsCopy.ts` (+2 -22) 📝 `packages/loot-core/src/server/budget/goals/goalsSimple.test.ts` (+8 -64) 📝 `packages/loot-core/src/server/budget/goals/goalsSimple.ts` (+2 -15) 📝 `packages/loot-core/src/server/budget/goals/goalsWeek.test.ts` (+2 -93) 📝 `packages/loot-core/src/server/budget/goals/goalsWeek.ts` (+2 -20) 📝 `packages/loot-core/src/server/budget/goaltemplates.ts` (+63 -25) 📝 `packages/loot-core/src/server/budget/template-notes.ts` (+1 -1) 📝 `packages/loot-core/src/server/budget/templateParser.pegjs` (+19 -15) 📝 `packages/loot-core/src/server/budget/types/templates.d.ts` (+12 -4) ➕ `upcoming-release-notes/3714.md` (+6 -0) </details> ### 📄 Description resolves #3711 This modifies the "limit" parser in templates to allow setting the limit to be monthly(current behavior, new default), weekly, or daily. Ex. `#template up to 5 per day` `#template up to 100 per week starting 2024-10-01` `#template up to 50 per day hold` So instead of using the given limit amount as the per month limit, the amount can conditionally be used as a daily or weekly limit. The template code will calculate the proper monthly limit from that. This will work with all existing templates that support a limit. The starting date acts the same here as the general weekly template. So give it a day and it will use that to figure out weeks. --- <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-04-14 21:05:23 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/actual#19379