-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cleanup tool group enhancement #2480
Conversation
✅ Deploy Preview for actualbudget ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Bundle Stats — desktop-clientHey there, this message comes from a GitHub action that helps you and reviewers to understand how these changes affect the size of this project's bundle. As this PR is updated, I'll keep you updated on how the bundle size is impacted. Total
Changeset No files were changed View detailed bundle breakdownAdded No assets were added Removed No assets were removed Bigger No assets were bigger Smaller No assets were smaller Unchanged
|
Bundle Stats — loot-coreHey there, this message comes from a GitHub action that helps you and reviewers to understand how these changes affect the size of this project's bundle. As this PR is updated, I'll keep you updated on how the bundle size is impacted. Total
Changeset
View detailed bundle breakdownAdded No assets were added Removed No assets were removed Bigger
Smaller No assets were smaller Unchanged No assets were unchanged |
I'm seeing that the global sources don't get their goal reset so the balance is colored yellow. |
I think the balances are being reset, but maybe the original methodology was wrong? I'm seeing the same behavior in the original PR to this one. The goal is being set to the current months spending, so if the category balance is zeroed out and a negative budgeted amount is entered, it won't reach the threshold of the goal. To turn a 'source' category green, maybe using the formula (budgeted-balance), which would set the budgeted amount to the same amount required to zero the category, should be used. |
This latest commit is quite a big change. I've updated the syntax, added a step to cover overspent categories within groups, and added the ability to add a category to a group that is neither a sink or source category. The use case I've envisioned with the neither sink nor source category.
|
@youngcw I see I inadvertently left the calculation for setting the goal indicator to 'budgeted - balance'. Take the opportunity to see if it is working better now. I'll revert it if it's still not what's expected. |
Could you change the message for the global pass to include that its part of that group in some way? |
I'm not sure what you mean. Are you referring to |
No the yellow message box when there isn't a sink. ( I think that was the warning). The messages for the lines with a group get the group name added to the message, but not the global pass |
I added |
This PR adds new ways to use the cleanup templates.
Group names can now be used to target specific categories.
Examples:
MyFirstGroup
In this example, all source funds from MyFirstGroup will only be distributed within MyFirstGroup. The 5th category also belongs to the group, which is neither a source nor a sink category, will be filled if it is overspent/under funded. The sink categories will then be funded based on the weight given.
My Second Group
All source funds from 'My Second Group' will be distributed to 'My Second Group'. They work independently of one another. The 9th category, which is part of 'My Second Group' will be funded before anything is distributed if it is overspent/under funded and then the funds from 'My Second Group' will be distributed to the sink categories based on weight.
Global
The group disbursements are calculated first (MyFirstGroup and My Second Group).
No source or sink templates that have a group defined will be used in the 'global' portion of the script. Any underfunded category will continue to be funded first (including the categories in groups), as long as the rollover carryover is not present.
After all groups are considered, the script runs as before and distributes the 'global' funds.
If a 'group sink' category is wished to be included in the 'global sink' calculation, a second line of
#cleanup sink
needs to be added to the category notes.If anyone has any feedback on the order of operations here, I'm open.
Currently it's:
I could see a case for moving (2) after (5) in order to fill underfunded categories first and then distribute the groups.