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 readable minimum, properties inherit many optional attributes from their enclosing scopes. We'll see further below, 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. All subsequent resources will have this rate unless specified differently.

You might also want to tell TaskJuggler about holidays that affect all resources. Global vacations are periods where TaskJuggler does not do any resource assignments to tasks.


# Register Good Friday as a global holiday for all resources.
vacation "Good Friday" 2002-03-29

Use the vacation attribute to define a global vacation. Global vacations must have a name and a date or date range. This is slightly different from vacations of individual resources. They are defined with the vacation attribute for resources and are unnamed.

Macros are another TaskJuggler feature to keep project files small. Macros are text patterns that can be defined once and inserted multiple times in the project file. 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 this macro further below in the example and then explain the meaning of the pattern.