Global Attributes

Besides finding suitable start and end dates of our project, we also like to do a simple profit and loss analysis. So we have to specify the default daily costs of an employee. This can be changed for certain employees later, but it illustrates an important concept of TaskJuggler - inheritance of attributes. In order to reduce the size of the TaskJuggler project file to a still readable minimum, properties inherit many optional attributes from their enclosing scope. We'll see further down, what this actually means. Here we are at top-level scope, so this is the default for all following properties.


rate 310.0

The rate attribute can be used to specify the daily costs of resources.

Macros are another TaskJuggler feature to keep project files small. Macros are text patterns that can be defined once and inserted many times further down the project. A macro always has a name and the text pattern is enclosed by square brackets.


macro allocate_developers [
  allocate dev1
  allocate dev2 { limits { dailymax 4h } }
  allocate dev3
]

To use the macro you simply have to write ${allocate_developers} and TaskJuggler will replace the term ${allocate_developers} with the pattern. We will use the macro further down in the example and then explain the meaning of the pattern.