Bug 301888

Summary: setting task duration messes up schedule
Product: [Applications] calligraplan Reporter: laurent.savaete
Component: generalAssignee: Dag Andersen <dag.andersen>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: 2.4.0   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed In: 2.5
Attachments: doc reproducing the problem
screenshot of gantt chart is it should look (taken with duration=2d)
screenshot of buggy gantt chart (with duration set to 2h)

Description laurent.savaete 2012-06-14 09:33:41 UTC
Created attachment 71821 [details]
doc reproducing the problem

In the attached file, if I change task programming/UI/build search page duration from 2d to 2h, then run schedule/calculate (using network scheduler, other schedulers seem ok), calculation completes, but the resulting gantt chart is buggy (subsequent tasks all start at same time, end dates are correct, so their duration is all wrong).
Changing duration back to 2d corrects the problem, at least in my understanding of things.
If I change first task duration, the problem does not occur.
Comment 1 laurent.savaete 2012-06-14 09:36:11 UTC
Created attachment 71822 [details]
screenshot of gantt chart is it should look (taken with duration=2d)
Comment 2 laurent.savaete 2012-06-14 09:37:43 UTC
Created attachment 71823 [details]
screenshot of buggy gantt chart (with duration set to 2h)
Comment 3 Dag Andersen 2012-06-15 08:40:49 UTC
Indeed!! Strange bug, almost funny :)
If the said task ends before end of day (so duration < 4h) scheduling fails.
I thought the scheduling was fairly time agnostic, but well, seems not.
Comment 4 Dag Andersen 2012-06-19 09:47:01 UTC
Git commit edf6debf2b07a43e175074a1efbf0b753db8d00c by Dag Andersen.
Committed on 19/06/2012 at 11:42.
Pushed by danders into branch 'master'.

Fix scheduling bug

If you have 3 (or more) tasks competing for same resource and
2 of the tasks end on same date the 3rd should start on the same date,
start time is not calculated correctly for the 3rd task.

M  +1    -4    plan/libs/kernel/kptschedule.cpp

http://commits.kde.org/calligra/edf6debf2b07a43e175074a1efbf0b753db8d00c