Menu

#22 Bad duration whan using 'start'

open
nobody
None
5
2012-07-18
2003-11-05
Anonymous
No

Let's try the following .sched file:

startdate 2003 11 05
dateformat iso
textreport tasks.txt
htmlreport tasks.html
weekly_html weekly.html
resource X "x"

vacation X 2003-11-06

task TEST "TEST" 1
candidate TEST X
start TEST 2003-11-05
===
TEST task will be scheduled with the following dates:
start: 2003-11-05
end: 2003-11-07
total duration: 2 days

If you remove 'start' command, the task will end
2003-11-05 as it is supposed.

This bug is around Project::StartTask, probably in block
// single candidate? just do it!
if ( t->numCandidates() == 1 )
{
t->setAssigned( *(t->begin_cando()) );
BookResource( t, NULL, t->assigned(), t->start(),
t->start(), TimeBlock::AUTO_SCHEDULE );
t->setDuration( t->duration() - 1 );

The problem is that t->remaining is not affected and
calculated elsewhere as '1'. So it schedules 1 more day
for this task. Setting t->remaining = t->duration()
hacks this problem away, but this is NOT a solution.
Moreover this block of code ignores assigned resource
efficiency value.

I think that the correct fix may be to calculate
real_remaining (Project::AssingResource ?) to subtract
part of work scheduled by 'start' directive

Discussion

Anonymous
Anonymous

Add attachments
Cancel