project test "Test" "1.0" 2007-08-31 +3w {
  workinghours mon-fri 9:00 - 12:00, 13:00 - 18:00
}

macro Fixend [
  minend ${1}
  maxend ${1}
]

shift mowefr "Mo, We, Fr shift" {
  workinghours mon, wed, fri 9:00 - 12:00, 13:00 - 18:00
  workinghours tue, thu, sat off
}
shift tuthsa "Tu, Th, Sa shift" {
  workinghours tue, thu, sat 9:00 - 12:00, 13:00 - 18:00
  workinghours mon, wed, fri off
}

resource tue_off "Tuesday off" {
  workinghours mon, wed - fri 10:00 - 18:00
  workinghours tue, sat, sun off
}
resource all_days "All days"
resource all_days2 "All days2"

resource only_wed "Only Wednesday" {
  workinghours sun - sat off
  resource ow1 "Monday off" {
    workinghours sun, mon, sat off
    workinghours tue - fri 10:00 - 18:00
  }
  resource ow2 "Tuesday off" {
    workinghours sun, tue, sat off
    workinghours mon, wed - fri 10:00 - 18:00
  }
  resource ow3 "Thu Fri off" {
    workinghours sun, thu - sat off
    workinghours mon - wed 10:00 - 18:00
  }
}
resource all_week_group "All week group" {
  workinghours mon - fri 10:00 - 18:00
  workinghours sat, sun off
  resource aw1 "All week 1"
  resource aw2 "All week 2"
  resource aw3 "All week 3"
  resource aw4 "All week 4"
}

task mandatory "Mandatory Tests" {
  task t1 "Task1" {
    start ${projectstart}
    effort 13d
    allocate tue_off { mandatory }, all_days
    ${Fixend "2007-09-12-18:00"}
  }

  task t2 "Task2" {
    start ${projectstart}
    effort 14d
    allocate only_wed { mandatory }, all_week_group
    ${Fixend "2007-09-12-18:00"}
  }
}

resource r1 "Resource 1"
resource r2 "Resource 2"
resource r3 "Resource 3"
resource r4 "Resource 4"

task inheritedAllocs "Inherited Allocations" {
  allocate r1
  task t1 "Task 1" {
    effort 3d
    ${Fixend "2007-09-04-18:00"}
  }
  task t2 "Task 2" {
    allocate r2
    task t2_1 "Task 2.1" {
      effort 2d
      ${Fixend "2007-09-03-18:00"}
    }
    task t2_2 "Task 2.2" {
      effort 4d
      depends !!t1
      ${Fixend "2007-09-06-18:00"}
    }
  }
  task t3 "Task 3" {
    effort 2d
    depends !t2
    ${Fixend "2007-09-10-18:00"}
  }
}

task allocShift "Allocation Shift" {
  effort 10d
  allocate r3 { shifts mowefr 2007-09-01 +1w },
           r4 { shifts tuthsa 2007-09-01 +1w }
  ${Fixend "2007-09-11-14:00"}
}

taskreport allocate "Allocate" {
  formats html
  columns no, name, end, daily
  hideresource 0
}

