Specifying Milestones

All tasks that have been discussed so far, had a certain duration. We did not always specify the duration explicitly, but we expect them to last for a certain period of time. Sometimes you just want to capture a certain moment in your project plan. These moments are usually called milestones, since they have some level of importance for the progress of the project.

TaskJuggler has support for milestones as well. They are handled as special types of tasks. By using the optional attribute milestone for a task, this task is declared a milestone. Milestones have no duration, so it's illegal to specify any duration criteria, or a non identical start and end date.


  task deliveries "Milestones" {

    account rev

    task start "Project start" {
      milestone
      start 2002-01-16
      delayed:start 2002-01-20
      startcredit 33000.0
    }

    task prev "Technology Preview" {
      milestone
      depends !!software.backend
      startcredit 13000.0
    }

    task beta "Beta version" {
      milestone
      depends !!test.alpha
      startcredit 13000.0
    }

    task done "Ship Product to customer" {
      milestone
      # maxend 2002-04-17
      depends !!test.beta, !!manual
      startcredit 14000.0
    }
  }
}

We have put all important milestones of the project as subtasks of the deliveries task. This way they show up nicely grouped in the reports. All milestones either have a dependency or a fixed start date. For the first milestone we have used the attribute start to set a fixed start date. All other tasks have direct or indirect dependencies on this task. Moving back the start date will slip the whole project. This has actually happened, so we use the delayed: prefix again to specify the start date for the delayed scenario.

Every milestone is linked to a customer payment. By using the startcredit attribute we can credit the specified amount to the account associated with this task. Since we have assigned the rev account to the enclosing task, all milestones will use this account as well.

Did you notice the line in the task done that starts with a hash? This line is commented out. If TaskJuggler finds a hash, it ignores the rest of the line. This way you can include comments in your project. The maxend attribute specifies that the task should end no later than the specified date. This information is not used for scheduling, but only for checking the schedule afterwards. Since the task will end later than the specified date, commenting out the line would trigger a warning.

Now the project has been completely specified. Stopping here would result in a valid TaskJuggler file that could be processed and scheduled. But no reports would be generated to visualize the results.