-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[Maintenence] Refactor Goals Schedule file #2102
[Maintenence] Refactor Goals Schedule file #2102
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
|
I think this is overwriting previous templates budgeted value. For example, this setup doesn't work right. This only ends up with the schedule value ($15) instead of the full 25.
|
That overwrite issue is fixed now. I still need to go through and make sure the chart and code make sense |
@shall0pass thanks for looking! I think I added those variables to fix a different calculation issue I found, but maybe I misunderstood how things were supposed to work. I'm on vacation right now so I don't have my computer but I'll take a look tomorrow and let you know if I noticed anything weird |
Remerged master and made sure #2125 was applied. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wasn't able to find/reproduce the original issue I found, so feel free to merge this as is. I'll open an issue in the repo if I can reproduce it.
Sorry I did not respond to your original review request @shall0pass. I don’t think my GitHub notifications are set right! Will look later - however I am seeing the same issues on current release as was reported in GitHub |
You're seeing the issue on 24.1.0 or you're seeing the issue in this PR? Nothing was merged for 24.1.0 around that issue, so it should still be unresolved. |
Understood - I have now been able to test my own file in this PR. It now fills the budget as it should for a single line annual "#template schedule x" but gives me an odd number (too low) where I have a series of annual "#template schedule ..." listed in the same category. |
* refactor pass 1 * refactor pass 2 * refactor pass 3 * commented out startDate * remove console logging * release note * non-repeating error * add daily * move else * Fix compounding to_budget * lint * reapply 2125
This is an attempt to simplify the schedules file by breaking out the logic in separate functions and hopefully squashing a few bugs in the process. I think this is a little easier to follow than the currently written method of nested if-else logic and will hopefully be easier to debug in the future. The calculation method remains the same, so hopefully there are no regressions 🤞.
One possible gotcha is the way the schedule templates are now filtered. It is possible that a schedule could end up in both the sinkingFund and full template arrays. I haven't seen it happen in any of the iterations I've tried so far but I may have missed a situation.
Believed to fixed:
@jfdoming You added startDate and started variables in #1899. I removed them because it was causing issue 1 above. Is there a schedule condition I need to check that I'm overlooking? It's simply commented for now so it's easy to turn back on.
This is an attempt at a flow chart for all of the logic happening in this file.