1 #+OPTIONS: H:3 num:nil toc:t \n:nil @:t ::t |:t ^:t -:t f:t *:t TeX:t LaTeX:t skip:nil d:(HIDE) tags:not-in-toc
2 #+STARTUP: align fold nodlcheck oddeven lognotestate
3 #+SEQ_TODO: TODO(t) INPROGRESS(i) WAITING(w@) | DONE(d) CANCELED(c@)
4 #+TAGS: Write(w) Update(u) Fix(f) Check(c)
5 #+TITLE: Creating Gantt charts by Exporting to TaskJuggler
6 #+AUTHOR: Christian Egli
7 #+EMAIL: christian DOT egli AT sbs DOT ch
12 [[file:index.org][{Back to Worg's index}]]
16 [[http://orgmode.org/][Org mode]] is an excellent tool for project planning as Peter Jones has
17 shown in his article on [[http://www.contextualdevelopment.com/articles/2008/project-planning][project planning]]. He first breaks the project
18 into features and tasks, then estimates the effort and from that
19 presents a project plan. In this tutorial we will take this one step
20 further, assign resources to the tasks, schedule the tasks and create
21 the corresponding gantt chart for this project.
23 We will be using [[http://www.taskjuggler.org/][TaskJuggler]] to handle the task scheduling, resource
24 leveling and creation of a myriad of charts (such as [[http://en.wikipedia.org/wiki/Gantt_chart][Gantt chart]]) for
25 your customer or your [[http://en.wikipedia.org/wiki/Pointy-haired_Boss][Pointy-haired Boss]].
28 You start out as you normally would by breaking down the project into
29 tasks. Let's take the following example where you have a project to
30 create an accounting software:
33 ,* Accounting Software
37 ,** Software Development
38 ,*** Database coupling
39 ,*** Back-End Functions
40 ,*** Graphical User Interface
50 ,*** Technology Preview
52 ,*** Ship Product to Customer
56 Now that you've figured out the tasks it's time to estimate the
57 efforts for each task. By using column view this can be done very
58 efficiently. It also helps to define the =COLUMNS= and default values
59 for the Effort property as shown in the following screen shot:
61 #+CAPTION: Estimating effort using column view
62 #+ATTR_HTML: alt="Estimating effort using column view"
63 [[file:../images/taskjuggler/effort-estimation.png]]
65 Your resulting Org mode project file will look somewhat like the
69 ,#+PROPERTY: Effort_ALL 2d 5d 10d 20d 30d 35d 50d
70 ,#+COLUMNS: %70ITEM(Task) %Effort
72 ,* Accounting Software
79 ,** Software Development
81 ,*** Database coupling
86 ,*** Back-End Functions
91 ,*** Graphical User Interface
114 ,*** Technology Preview
116 ,*** Ship Product to Customer
119 * Generate a Gantt chart
120 Before you now export the project to TaskJuggler you need to tell the
121 exporter in which tree it can find the tasks. You do this by adding
122 the tag ~taskjuggler_project~ to the node "Accounting Software"[fn:1].
123 Do this by moving to the "Accounting Software" headline and typing the
126 : C-c C-c taskjuggler_project RET
128 This allows you to have other nodes for this project such as an
129 introduction or general notes.
131 To export the project to TaskJuggler you simply type
133 : M-x org-export-as-taskjuggler-and-open
135 This will open your project in TaskJugglerUI as illustrated below
137 #+CAPTION: Gantt chart in TaskJugglerUI
138 #+ATTR_HTML: alt="Gantt chart in TaskJugglerUI"
139 [[file:../images/taskjuggler/TaskJugglerUI1.png]]
141 Since we have not assigned any resources to work on the project the
142 exporter assumes that you will be the one working on it and has
143 assigned all tasks to you. The tasks have been serialized so that you
144 will not have to many things to do at once, i.e. the resources will be
148 The next step is to list all the resources working on the project and
149 assign the tasks to them. Create a node for the resources. You can
150 group the resources by creating hierarchies. Tag the resource tree
151 with the tag ~taskjuggler_resource~ so that the exporter knows where to
152 look for resource definitions[fn:2].
155 ,* Resources :taskjuggler_resource:
181 As you'll note I also added some ~resource_id~ properties to some of
182 the resources (or resource groups). I will use these identifiers to
183 allocate the resources to the tasks. The exporter will create unique
184 ids for the resources automatically[fn:3], but if you want to use
185 short forms it's better to define ~resource_id~ properties for your
186 resources. This will also allow you to define default values for the
187 allocation as follows:
189 : #+PROPERTY: allocate_ALL dev doc test
191 The easiest way to assign resources is again the column view mode.
192 There is no need to allocate a resource to every task, as allocations
193 are inherited in TaskJuggler[fn:4]. You'll note in the screen shot
194 below that some tasks have more than one resource assigned to them.
195 TaskJuggler will calculate the duration of the task based on the
196 effort and the resources working on this task.
198 #+CAPTION: Assign resources
199 #+ATTR_HTML: alt="Assign resources"
200 [[file:../images/taskjuggler/assign-resources.png]]
202 If we now export the project you'll see that TaskJuggler scheduled
203 some tasks in parallel (as there are several resources now which can
204 work in parallel). See the screen shot below:
206 #+CAPTION: Gantt Chart with multiple resources
207 #+ATTR_HTML: alt="Gantt Chart with multiple resources"
208 [[file:../images/taskjuggler/TaskJugglerUI2.png]]
210 Obviously we need to define dependencies between the tasks.
212 * Define dependencies
213 There are several ways to define dependencies between tasks. When
214 coming from an Org mode background you probably want to define them
215 using the facilities provided by Org mode, which are either
217 - The =ORDERED= property which allows you to state that the child
218 tasks have to be completed in the order they appear (top most
221 - The =BLOCKER= property which allows you to state that a task
223 - a previous sibling ("previous-sibling") or
224 - any other task by stating the ~task_id~ property of the
227 Again, it is probably easiest to define the dependencies using the
228 column view as shown below in the screen shot:
230 #+CAPTION: Defining dependencies using column view
231 #+ATTR_HTML: alt="Defining dependencies using column view"
232 [[file:../images/taskjuggler/define-dependencies.png]]
234 Lastly there is also the ~depends~ property which corresponds to the
235 TaskJuggler terminology. It can be used the same way as the =BLOCKER=
236 property. This is illustrated below where the "Software Development"
237 for example is blocked by the task "Specification", i.e. it has to
238 wait until the specification is done. The task "Software Development"
239 is defined as =ORDERED=, i.e. all the subtasks of it have to be
240 completed in sequence. Another example is the milestone "Ship Product
241 to Customer" which is waiting until the Beta test and the Manual are
245 ,#+PROPERTY: Effort_ALL 2d 5d 10d 20d 30d 35d 50d
246 ,#+PROPERTY: allocate_ALL dev doc test
247 ,#+COLUMNS: %30ITEM(Task) %Effort %allocate %BLOCKER %ORDERED
249 ,* Accounting Software :taskjuggler_project:
258 ,** Software Development
261 , :BLOCKER: previous-sibling
266 ,*** Database coupling
271 ,*** Back-End Functions
277 ,*** Graphical User Interface
280 , :allocate: paul, seb
286 , :BLOCKER: previous-sibling
299 , :allocate: test, paul
316 ,*** Technology Preview
326 ,*** Ship Product to Customer
328 , :BLOCKER: beta manual
332 ,* Resources :taskjuggler_resource:
351 , :limits: { dailymax 6.4h }
359 If you export the example above you'll TaskJuggler will schedule the
360 tasks as shown in the screen shot below
362 #+CAPTION: Gantt Chart with dependencies
363 #+ATTR_HTML: alt="Gantt Chart with dependencies"
364 [[file:../images/taskjuggler/TaskJugglerUI3.png]]
366 Also TaskJuggler will give you a overview how busy youre resources
367 will be and what they are working on. See below for a screen shot:
369 #+CAPTION: Resource usage chart
370 #+ATTR_HTML: alt="Resource usage chart"
371 [[file:../images/taskjuggler/resource-graph.png]]
373 Finally you can generate [[file:../images/taskjuggler/project-plan.pdf][good-looking project plans]] in PDF by printing
374 from TaskJuggler. This will make any [[http://en.wikipedia.org/wiki/Pointy-haired_Boss][Pointy-haired Boss]] happy.
376 * Export of other properties
377 Generally the exporter writes a node property that is known to
378 TaskJuggler (such as ~shift~, ~booking~, ~efficiency~, ~journalentry~,
379 ~rate~ for resources or ~account~, ~start~, ~note~, ~duration~, ~end~,
380 ~journalentry~, ~milestone~, ~reference~, ~responsible~, ~scheduling~,
381 etc for tasks) as is to the TaskJuggler file.
383 Other properties such as completeness or priority are derived from
384 implicit information in the Org mode file. The TODO state for example
385 determines the completeness. A task will be exported with 100%
386 complete (~complete 100~) if it is marked as done. The priority of a
387 task will be determined through its priority cookie.
391 [fn:1] You can customize this tag
393 [fn:2] Again, of course this tag can be customized
395 [fn:3] by downcasing the headline, replacing non-ascii characters with
396 '_' and picking the first word if it is unique
398 [fn:4] In TaskJuggler the allocations are cumulative, the exporter
399 however adds some code so that inherited allocation are ignored when
400 explicitly assigning a resource.