-
-
Notifications
You must be signed in to change notification settings - Fork 4
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
add test budget-with-subgoal #433
Conversation
@thinkrapido @kobe-reygel |
…to tijl/-/add-budget-with-subgoal-test
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.
Mainly resolve some code duplications.
Sorry for the messy commit history.
I didn't want to loose out on the improvements from the other PRs waiting for review - and then I tried rebasing for the first time :) This PR's commits start at fix unwrap bug - a commit that wasn't necessary and is overturned later... Still haven't figured out how to clean that up so I get a commit history that reads like a story...
In terms of the strategies outlined below, the simple Goals get scheduled first anyway - so there was no special change needed for current test cases. Just filtering the Hours based on the Budget and updating the Budget when placing the simple Goal.
Basically what I did to fix this issue:
activity.update_overlay_with(&calendar.budgets);
) to also update Simple Goal overlays when the Simple Goal is part of a Budget=============================
Original PR/issue description:
Test where someone has a workbudget of 40h on weekdays. Below that, as a subgoal, we add a 1h 'Plan my work week'.
Since the goal is more specific than the generic budget - it should be planned first - and also reduce the budget by one hour, as it counts as work (since it's a subgoal of work).
Technically, I see a few ways of approaching this:
Vec<Activity>
as the budget - but at the beginning of the Vec - it will get scheduled first - as it will always have the same flexibility as the other budget Activity hours?