[PR #3829] [MERGED] [Goals] fix limits #12135

Closed
opened 2026-04-10 21:20:29 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/actualbudget/actual/pull/3829
Author: @youngcw
Created: 11/13/2024
Status: Merged
Merged: 11/19/2024
Merged by: @youngcw

Base: masterHead: youngcw/fix-limits


📝 Commits (5)

  • e667e14 fix limits
  • c515adb cleanup
  • 0a6f162 fix cases of negative previous balance
  • bf6562c Merge branch 'master' into youngcw/fix-limits
  • 3615e7c Merge branch 'master' into youngcw/fix-limits

📊 Changes

4 files changed (+87 additions, -52 deletions)

View changed files

📝 packages/loot-core/src/server/budget/actions.ts (+9 -0)
📝 packages/loot-core/src/server/budget/categoryTemplate.ts (+71 -48)
📝 packages/loot-core/src/server/budget/goaltemplates.ts (+1 -4)
upcoming-release-notes/3829.md (+6 -0)

📄 Description

since limits were being applied at the end of the processing chain, the funds pulled from categories because of the limit never had a chance to be used in other underfunded categories.

Ive reworked the limits to apply at the beginning, to return any excess from the previous month; and every priority pass, to not pull in unneeded funds. Goals for the categories with limits should also set correctly now. This also now handles rollover funds properly.

To test:

  1. make a category with a limit template
  2. Make a category with template that wont get fully funded with a priority level higher than the limit
  3. have there be extra funds in that first category being carried from the previous month to cause the limit to already be met
  4. Run templates and see that the funds removed by the limit are able to be used in the underfunded category (edge will have leftover even though the category is underfunded)

🔄 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/3829 **Author:** [@youngcw](https://github.com/youngcw) **Created:** 11/13/2024 **Status:** ✅ Merged **Merged:** 11/19/2024 **Merged by:** [@youngcw](https://github.com/youngcw) **Base:** `master` ← **Head:** `youngcw/fix-limits` --- ### 📝 Commits (5) - [`e667e14`](https://github.com/actualbudget/actual/commit/e667e14e510bc0cb86cdd4f7db3a8dad3090906b) fix limits - [`c515adb`](https://github.com/actualbudget/actual/commit/c515adb32f4713cd0d455b3acbbcc9f116b00a24) cleanup - [`0a6f162`](https://github.com/actualbudget/actual/commit/0a6f162041894346c5d8d66f2e985810e76c1e41) fix cases of negative previous balance - [`bf6562c`](https://github.com/actualbudget/actual/commit/bf6562ccf6fbf3b8b5b5f3a7844b7236baae1e8b) Merge branch 'master' into youngcw/fix-limits - [`3615e7c`](https://github.com/actualbudget/actual/commit/3615e7cfa7a52ac417f37b12e883096f72db34d5) Merge branch 'master' into youngcw/fix-limits ### 📊 Changes **4 files changed** (+87 additions, -52 deletions) <details> <summary>View changed files</summary> 📝 `packages/loot-core/src/server/budget/actions.ts` (+9 -0) 📝 `packages/loot-core/src/server/budget/categoryTemplate.ts` (+71 -48) 📝 `packages/loot-core/src/server/budget/goaltemplates.ts` (+1 -4) ➕ `upcoming-release-notes/3829.md` (+6 -0) </details> ### 📄 Description since limits were being applied at the end of the processing chain, the funds pulled from categories because of the limit never had a chance to be used in other underfunded categories. Ive reworked the limits to apply at the beginning, to return any excess from the previous month; and every priority pass, to not pull in unneeded funds. Goals for the categories with limits should also set correctly now. This also now handles rollover funds properly. To test: 1. make a category with a limit template 2. Make a category with template that wont get fully funded with a priority level higher than the limit 3. have there be extra funds in that first category being carried from the previous month to cause the limit to already be met 4. Run templates and see that the funds removed by the limit are able to be used in the underfunded category (edge will have leftover even though the category is underfunded) --- <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-10 21:20:29 -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#12135