taskjuggler / TaskJuggler

TaskJuggler - Project Management beyond Gantt chart drawing
http://www.taskjuggler.org
GNU General Public License v2.0
721 stars 170 forks source link

tj3 shifts #1

Closed pijoter closed 13 years ago

pijoter commented 13 years ago

shifts (task) does not work at all; when combined with length attribute then no errors are shown but reports ignore different shifts (and use defaults). When combined with effort attribute then tj3 raise error:

Reading file test.tjp                                        [      Done      ]
Preparing scenario planowo                                   [      Done      ]
test.tjp:51: Warning in scenario plan: Task project.t21 does not fit into project time frame
Warning: 1 tasks could not be scheduled
Warning in scenario plan: Task project.t21: 2011-03-16-22:00-+0100 -> <?>
Scheduling scenario planowo                                  [      Done      ]

Anyway - tasks with "length" not always are bout to resources despite that they are available.

task t11 "11" {
    length 1d  <-- resources are not bound
    #effort 1d
    allocate p1
}

complete example

project testowanie "t" "1.0" 2011-03-07-9:00 +4m {
timingresolution 60min
timezone "Europe/Warsaw"
timeformat "%Y-%m-%d %H:%M"
shorttimeformat "%H:%M"
currency "PLN"
weekstartsmonday
#workinghours mon - fri 9:00 - 11:00, 12:00 - 14:00
#workinghours sat, sun off
dailyworkinghours 8
scenario plan "planowo" {
}
}
shift home "home" {
workinghours mon - fri 18:00 - 22:00
workinghours sat, sun off
}
shift office "office" {
workinghours mon - fri 8:00 - 12:00, 13:00 - 17:00
workinghours sat, sun off
}
resource p1 "p1" {shifts home}
resource p2 "p2"
resource p3 "p3"
resource p4 "p4"
task project "project" {
start 2011-03-15-09:00
task t11 "11" {
    length 1d
    #effort 1d
    allocate p1
}
task t12 "12" {
    length 1d
    allocate p2
    depends !t11
}
task t21 "21" {
    shifts home
    depends project.t11
    length 1h
    allocate p3
}
task t22 "2.2" {
    length 1h
    allocate p4
}
}
taskreport report1 "Test.Gantt.Chart" {
selfcontained yes
formats html
headline "Project Gantt Chart"
columns hierarchindex,name,start,end,effort,resources,chart {
    scale hour
    width 600
}
timeformat "%Y-%m-%d %H:%M"
loadunit longauto
#hideresource 1
}
scrapper commented 13 years ago

I can't see anything wrong here. 'length' will not guarantee you any resource assignments. If the resource is not available, you won't get any bookings. You've defined t1 to start at 2011-03-15-09:00 and to last 1d (8h). So it ends before p1 begins to work that day (18:00).

pijoter commented 13 years ago

but task t11 length 1d - so resource p1 must be available between 2011-03-15-09:00 + 1 working day (working day for p1 is mon-fri 18-22); there is no ther tasks for p1 resource!

Simply put - i don't understat how booking works for shifts. Documentation says:

   "This is an additional working time restriction on top of the working hours of the  allocated resources. It does not replace the resource working hour restrictions". 

When default workingours are "mon-fri 9:00-12:00 13:00-18:00" and shift workinghours "mon-fri 18:00-22:00" then what are effective workinghours for resource?

The same apply to shifts (task):

  "For a resource to be assigned to a time slot, both the respective task shift as well as the resource working hours must declare the time slot as duty slot"

This mean that when resource share default workinghours then there are little chance to assign shift to the task because workinghours are so different? Maybe if here is no explicit global workinghours then resources hould use shift workinghours instead?

scrapper commented 13 years ago

A length of 1d is 8h, not 24h. That would be a duration of 1d. The 8h are counted from the 9:00 start time. 9 + 8 = 17. So the period is over before your shift even starts.

pijoter commented 13 years ago

length is measured in "default" workinghours (8h daily) or in workinghours of the resource (in this case - shift "home", 1 workingday = 4h from 18:00 to 22:00)? Then resource p1 could be bound to task t11 from 18:00 to 22:00.

In other words: when i say "hey, p1 - now is 9:00 am and you have 1 working day to complete this task" then this task must be completed till 22:00. When i say that on 19:00 then task must be completed till 19:00 next working day. Or I miss something?

scrapper commented 13 years ago

The resource working hours do not affect the resulting duration, only the global working hours do. I've clarified this in the manual. The original documentation for 'length' was not clear on this. Thanks for bringing this up!