Closed tijlleenders closed 9 months ago
@thinkrapido @kobe-reygel
This is a failing test case. I've not made a separate issue for it - but have added the PR to the project board parking lot - where it appears just like an issue - and can be self-assigned if you'd like to work on solving this.
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?