[PR #1780] [MERGED] Goals: Save full goal value and add an indicator of goal status #3952

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

📋 Pull Request Information

Original PR: https://github.com/actualbudget/actual/pull/1780
Author: @youngcw
Created: 10/10/2023
Status: Merged
Merged: 11/8/2023
Merged by: @youngcw

Base: masterHead: youngcw/goal_progress


📝 Commits (10+)

  • 28899ea first pass at progress bar
  • 8622b77 db migration / enter goal in db
  • cad101c add getGoal function
  • f1a9aeb stabilize
  • 1eab530 Merge branch 'master' into goalProgressBar
  • 2c8c5a6 whoops
  • 756e73f TS
  • 66fc6a6 reset goal in db if no template found
  • 2033e52 Merge branch 'master' into goalProgressBar
  • 9c7f6b3 Merge branch 'actualbudget:master' into goalProgressBar

📊 Changes

13 files changed (+252 additions, -123 deletions)

View changed files

📝 packages/desktop-client/src/components/budget/BalanceWithCarryover.tsx (+16 -3)
📝 packages/desktop-client/src/components/budget/MobileBudgetTable.js (+2 -0)
📝 packages/desktop-client/src/components/budget/report/components.tsx (+2 -0)
📝 packages/desktop-client/src/components/budget/rollover/rollover-components.tsx (+2 -0)
📝 packages/desktop-client/src/components/budget/util.ts (+17 -6)
packages/loot-core/migrations/1694438752000_add_goal_targets.sql (+7 -0)
📝 packages/loot-core/src/client/queries.ts (+2 -0)
📝 packages/loot-core/src/server/budget/actions.ts (+18 -0)
📝 packages/loot-core/src/server/budget/base.ts (+1 -0)
📝 packages/loot-core/src/server/budget/goaltemplates.ts (+173 -111)
📝 packages/loot-core/src/server/budget/types/handlers.d.ts (+5 -3)
📝 packages/loot-core/src/server/sheet.ts (+1 -0)
upcoming-release-notes/1780.md (+6 -0)

📄 Description

This is a first step in a more capable goal template system. This adds a db column for saving the goal values, then uses that db value to color the category balance based on if the goal is met or not.

The respective handlers for db changes were modified so the budget cache updates as needed, and is setup upon a cache reset.

We also added in a db entry to save the template json so that once a gui is made to create the templates the db is already ready. Writing/reading from that field has been added so that the transition away from the notes will be smoother.

For testing:
Use a test file or an export of your budget to not cause db migration issues.

Existing Behavior/Templates Disabled
image

New Behavior
image


🔄 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/1780 **Author:** [@youngcw](https://github.com/youngcw) **Created:** 10/10/2023 **Status:** ✅ Merged **Merged:** 11/8/2023 **Merged by:** [@youngcw](https://github.com/youngcw) **Base:** `master` ← **Head:** `youngcw/goal_progress` --- ### 📝 Commits (10+) - [`28899ea`](https://github.com/actualbudget/actual/commit/28899ea0a93532fa71851613c21fdf86635c8dc6) first pass at progress bar - [`8622b77`](https://github.com/actualbudget/actual/commit/8622b77404fb6159005bde23fd859a46f91085fa) db migration / enter goal in db - [`cad101c`](https://github.com/actualbudget/actual/commit/cad101c72b73b8e27bc79c9bffbdcb20d41ee63e) add getGoal function - [`f1a9aeb`](https://github.com/actualbudget/actual/commit/f1a9aebae7daaab2b97939a6bfbffcd6361bbdc3) stabilize - [`1eab530`](https://github.com/actualbudget/actual/commit/1eab5305cbd95231969f2759eb7b5af8e16c9a3a) Merge branch 'master' into goalProgressBar - [`2c8c5a6`](https://github.com/actualbudget/actual/commit/2c8c5a6cfc4e084008958debc80103cadfa7e587) whoops - [`756e73f`](https://github.com/actualbudget/actual/commit/756e73f2e25516e667bd23646563de5106389dda) TS - [`66fc6a6`](https://github.com/actualbudget/actual/commit/66fc6a625df8fa649d12e2366d8c4ca125d7b338) reset goal in db if no template found - [`2033e52`](https://github.com/actualbudget/actual/commit/2033e52f572fd435ad9c12bd4e4aea80da8faea7) Merge branch 'master' into goalProgressBar - [`9c7f6b3`](https://github.com/actualbudget/actual/commit/9c7f6b312f920bcf2ecaef95cb0d35def242b3e5) Merge branch 'actualbudget:master' into goalProgressBar ### 📊 Changes **13 files changed** (+252 additions, -123 deletions) <details> <summary>View changed files</summary> 📝 `packages/desktop-client/src/components/budget/BalanceWithCarryover.tsx` (+16 -3) 📝 `packages/desktop-client/src/components/budget/MobileBudgetTable.js` (+2 -0) 📝 `packages/desktop-client/src/components/budget/report/components.tsx` (+2 -0) 📝 `packages/desktop-client/src/components/budget/rollover/rollover-components.tsx` (+2 -0) 📝 `packages/desktop-client/src/components/budget/util.ts` (+17 -6) ➕ `packages/loot-core/migrations/1694438752000_add_goal_targets.sql` (+7 -0) 📝 `packages/loot-core/src/client/queries.ts` (+2 -0) 📝 `packages/loot-core/src/server/budget/actions.ts` (+18 -0) 📝 `packages/loot-core/src/server/budget/base.ts` (+1 -0) 📝 `packages/loot-core/src/server/budget/goaltemplates.ts` (+173 -111) 📝 `packages/loot-core/src/server/budget/types/handlers.d.ts` (+5 -3) 📝 `packages/loot-core/src/server/sheet.ts` (+1 -0) ➕ `upcoming-release-notes/1780.md` (+6 -0) </details> ### 📄 Description This is a first step in a more capable goal template system. This adds a db column for saving the goal values, then uses that db value to color the category balance based on if the goal is met or not. The respective handlers for db changes were modified so the budget cache updates as needed, and is setup upon a cache reset. We also added in a db entry to save the template json so that once a gui is made to create the templates the db is already ready. Writing/reading from that field has been added so that the transition away from the notes will be smoother. For testing: Use a test file or an export of your budget to not cause db migration issues. Existing Behavior/Templates Disabled ![image](https://github.com/actualbudget/actual/assets/28542559/0e6cf80b-20d2-47e5-843f-fdadc8c4f16c) New Behavior ![image](https://github.com/actualbudget/actual/assets/28542559/53d39334-77af-4330-bb10-530cef1abb16) --- <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 20:49:20 -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#3952