File: template.tjp

package info (click to toggle)
tj3 3.8.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 5,048 kB
  • sloc: ruby: 36,481; javascript: 1,113; sh: 19; makefile: 17
file content (338 lines) | stat: -rw-r--r-- 9,257 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
/*
 * This file contains a project skeleton. It is part of the
 * TaskJuggler project management tool. You can use this as a basis to
 * start your own project file.
 */
project your_project_id "Your Project Title"  2011-11-11-0:00--0500 +4m {
  # Set the default time zone for the project. If not specified, UTC
  # is used.
  timezone "America/New_York"
  # Hide the clock time. Only show the date.
  timeformat "%Y-%m-%d"
  # Use US format for numbers
  numberformat "-" "" "," "." 1
  # Use US financial format for currency values. Don't show cents.
  currencyformat "(" ")" "," "." 0
  # Pick a day during the project that will be reported as 'today' in
  # the project reports. If not specified, the current day will be
  # used, but this will likely be outside of the project range, so it
  # can't be seen in the reports.
  now 2011-12-24
  # The currency for all money values is the Euro.
  currency "USD"

  # You can define multiple scenarios here if you need them.
  #scenario plan "Plan" {
  #  scenario actual "Actual"
  #}

  # You can define your own attributes for tasks and resources. This
  # is handy to capture additional information about the project that
  # is not directly impacting the project schedule, but which you like to
  # keep in one place.
  #extend task {
  #  reference spec "Link to Wiki page"
  #}
  #extend resource {
  #  text Phone "Phone"
  #}
}

copyright "Claim your rights here"

# If you have any text block that you need multiple times to describe
# your project, you should define a macro for it. Macros can even have
# variable segments that you can set upon calling the macro.
#
# macro Task [
#   task "A ${1} task" {
#   }
# ]
#
# Can be called as
# ${Task "big"}
# to generate
# task "A big task" {
# }

# You can attach flags to accounts, resources and tasks. These can be
# used to filter out subsets of them during reporting.
flags important, hidden

# If you want to do budget planning for your project, you need to
# define some accounts.
account cost "Project Cost" {
  account dev "Development"
  account doc "Documentation"
}
account rev "Customer Payments"

# The Profit & Loss analysis should be rev - cost accounts.
balance cost rev

# Define your public holidays here.
vacation "New Year's Day" 2012-01-02
vacation "Birthday of Martin Luther King, Jr." 2012-01-16
vacation "Washington's Birthday" 2012-02-20
vacation "Memorial Day" 2012-05-28
vacation "Independence Day" 2012-07-04
vacation "Labor Day" 2012-09-03
vacation "Columbus Day" 2012-10-08
vacation "Veterans Day" 2012-11-12
vacation "Thanksgiving Day" 2012-11-22
vacation "Christmas Day" 2012-12-25

# The daily default rate of all resources. This can be overridden for each
# resource. We specify this so we can do a good calculation of
# the costs of the project.
rate 400.0

# This is a set of example resources.
resource r1 "Resource 1"
resource t1 "Team 1" {
  managers r1
  resource r2 "Resource 2"
  resource r3 "Resource 3"
}

# This is a resource that does not do any work.
resource s1 "System 1" {
  efficiency 0.0
  rate 600.0
}

task project "Project" {
  task wp1 "Workpackage 1" {
    task t1 "Task 1"
    task t2 "Task 2"
  }
  task wp2 "Work package 2" {
    depends !wp1
    task t1 "Task 1"
    task t2 "Task 2"
  }
  task deliveries "Deliveries" {
    task "Item 1" {
      depends !!wp1
    }
    task "Item 2" {
      depends !!wp2
    }
  }
}

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

navigator navbar {
  hidereport 0
}

macro TaskTip [
  tooltip istask() -8<-
    '''Start: ''' <-query attribute='start'->
    '''End: ''' <-query attribute='end'->
    ----
    '''Resources:'''

    <-query attribute='resources'->
    ----
    '''Precursors: '''

    <-query attribute='precursors'->
    ----
    '''Followers: '''

    <-query attribute='followers'->
    ->8-
]

textreport frame "" {
  header -8<-
    == TaskJuggler Project Template ==
    <[navigator id="navbar"]>
  ->8-
  footer "----"
  textreport index "Overview" {
    formats html
    center '<[report id="overview"]>'
  }

  textreport "Status" {
    formats html
    center -8<-
      <[report id="status.dashboard"]>
      ----
      <[report id="status.completed"]>
      ----
      <[report id="status.ongoing"]>
      ----
      <[report id="status.future"]>
    ->8-
  }

  textreport wps "Work packages" {
    textreport wp1 "Work package 1" {
      formats html
      center '<[report id="wp1"]>'
    }

    textreport wp2 "Work package 2" {
      formats html
      center '<[report id="wp2"]>'
    }
  }

  textreport "Deliveries" {
    formats html
    center '<[report id="deliveries"]>'
  }

  textreport "ContactList" {
    formats html
    title "Contact List"
    center '<[report id="contactList"]>'
  }
  textreport "ResourceGraph" {
    formats html
    title "Resource Graph"
    center '<[report id="resourceGraph"]>'
  }
}

# A traditional Gantt chart with a project overview.
taskreport overview "" {
  header -8<-
    === Project Overview ===

    The project is structured into 2 work packages.

    # Specification
    # <-reportlink id='frame.wps.wp1'->
    # <-reportlink id='frame.wps.wp2'->
    # Testing

    === Original Project Plan ===
  ->8-
  columns bsi { title 'WBS' },
          name, start, end, effort, cost,
          revenue, chart { ${TaskTip} }
  # For this report we like to have the abbreviated weekday in front
  # of the date. %a is the tag for this.
  timeformat "%a %Y-%m-%d"
  loadunit days
  hideresource 1
  balance cost rev
  caption 'All effort values are in man days.'

  footer -8<-
    === Staffing ===

    All project phases are properly staffed. See [[ResourceGraph]] for
    detailed resource allocations.

    === Current Status ===

    Some blurb about the current situation.
  ->8-
}

# Macro to set the background color of a cell according to the alert
# level of the task.
macro AlertColor [
  cellcolor plan.alert = 0 "#90FF90" # green
  cellcolor plan.alert = 1 "#FFFF90" # yellow
  cellcolor plan.alert = 2 "#FF9090" # red
]

taskreport status "" {
  columns bsi { width 50 title 'WBS' }, name { width 150 },
          start { width 100 }, end { width 100 },
          effort { width 100 },
          alert { tooltip plan.journal
                          != '' "<-query attribute='journal'->" width 150 },
          status { width 150 }

  taskreport dashboard "" {
    headline "Project Dashboard (<-query attribute='now'->)"
    columns name { title "Task" ${AlertColor} width 200},
            resources { width 200 ${AlertColor}
                        listtype bullets
                        listitem "<-query attribute='name'->"
                        start ${projectstart} end ${projectend} },
            alerttrend { title "Trend" ${AlertColor} width 50 },
            journal { width 350 ${AlertColor} }
    journalmode status_up
    journalattributes headline, author, date, summary, details
    hidetask ~hasalert(0)
    sorttasks alert.down, plan.end.up
    period %{${now} - 1w} +1w
  }
  taskreport completed "" {
    headline "Already completed tasks"
    hidetask ~(plan.end <= ${now})
  }
  taskreport ongoing "" {
    headline "Ongoing tasks"
    hidetask ~((plan.start <= ${now}) & (plan.end > ${now}))
  }
  taskreport future "" {
    headline "Future tasks"
    hidetask ~(plan.start > ${now})
  }
}

# A list of tasks showing the resources assigned to each task.
taskreport wp1 "" {
  headline "Work package 1 - Resource Allocation Report"
  columns bsi { title 'WBS' }, name, start, end, effort { title "Work" },
          duration, chart { ${TaskTip} scale day width 500 }
  timeformat "%Y-%m-%d"
  hideresource ~(isleaf() & isleaf_())
  sortresources name.up
  taskroot project.wp1
}
# A list of tasks showing the resources assigned to each task.
taskreport wp2 "" {
  headline "Work package 2 - Resource Allocation Report"
  columns bsi { title 'WBS' }, name, start, end, effort { title "Work" },
          duration, chart { ${TaskTip} scale day width 500 }
  timeformat "%Y-%m-%d"
  hideresource ~(isleaf() & isleaf_())
  sortresources name.up
  taskroot project.wp2
}

# A list of all tasks with the percentage completed for each task
taskreport deliveries "" {
  headline "Project Deliverables"
  columns bsi { title 'WBS' }, name, start, end, note { width 150 }, complete,
          chart { ${TaskTip} }
  taskroot project.deliveries
  hideresource 1
}
# A list of all employees with their contact details.
resourcereport contactList "" {
  headline "Contact list and duty plan"
  columns name,
          email { celltext 1 "[mailto:<-email-> <-email->]" },
          managers { title "Manager" },
          chart { scale day }
  hideresource ~isleaf()
  sortresources name.up
  hidetask 1
}

# A graph showing resource allocation. It identifies whether each
# resource is under- or over-allocated for.
resourcereport resourceGraph "" {
  headline "Resource Allocation Graph"
  columns no, name, effort, rate, weekly { ${TaskTip} }
  loadunit shortauto
  # We only like to show leaf tasks for leaf resources.
  hidetask ~(isleaf() & isleaf_())
  sorttasks plan.start.up
}