tijlleenders / ZinZen-scheduler

The calendar engine for the ZinZen web app.
https://github.com/tijlleenders/ZinZen
GNU Affero General Public License v3.0
10 stars 4 forks source link

add test filler-goal #434

Closed tijlleenders closed 7 months ago

tijlleenders commented 9 months ago

Test for filler-goal.

The idea is that when you have a big one-time thing of several hours - you might put a reservation of X hours on the calendar. Then as you think of more things - you add subGoals that can be independently achieved. If there is time left over in the parent goal after the specific subGoals have been achieved - that time also gets reserved on the calendar.

Another example would be a vacation day - where you have a few things you want to do - so you make specific subGoals for that - but the rest of the day is left open - but you still want the rest scheduled on the calendar as 'vacation day'.

tijlleenders commented 9 months ago

@kobe-reygel @thinkrapido Another failing test case someone can pick up.

thinkrapido commented 9 months ago

done by https://github.com/tijlleenders/ZinZen-scheduler/pull/447

tijlleenders commented 8 months ago

@thinkrapido I'm sorry - I didn't provide enough detail to make it clear what is required to solve this issue. Thanks for the work and solution provided. I'll see if I can build on that.

moaz-mokhtar commented 8 months ago

Hello @kobe-reygel @thinkrapido

I hope you are doing well.

I will work on this

moaz-mokhtar commented 8 months ago

I want make sure that I understand the issue to be resolved.

tijlleenders commented 8 months ago

@moaz-mokhtar Why do you think the subGoal needs to go beyond the parent goal's deadline?

The subGoal is >>part of work Goal<< and as such the Activity it generates:

moaz-mokhtar commented 8 months ago

I did debug yesterday and would like to share below information.

tijlleenders commented 8 months ago

@moaz-mokhtar Please focus comments in this PR solely on the filler-goal test case.
If you think there is something wrong / to be improved in other test cases - please make a separate issue for that. Otherwise it will become very confusing very fast.

All I'm asking in this PR is a passing test case based on correctly generated Activities and output Tasks - while keeping input Goals immutable.

tijlleenders commented 8 months ago

@moaz-mokhtar There have been some improvements to main while this PR was outstanding.
Please resolve the merge conflicts, respecting the improvements in main.

tijlleenders commented 8 months ago

@moaz-mokhtar I think I merged correctly - but that resulted in the tests failing.
Please double-check and investigate.

tijlleenders commented 7 months ago

The approach of adjusting Activities is convoluted and hard to follow. It' better to generate filler Activities as a separate step.

Placing in two separate steps is also not desired, as it implicitly says Budget Activities are less important than simple Goal Activities - and they can't interact with each other to optimize placing.