1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/styles/vym2taskjuggler.xsl Fri Feb 01 15:28:35 2008 +0000
1.3 @@ -0,0 +1,270 @@
1.4 +<?xml version="1.0" encoding="ISO-8859-1"?>
1.5 +<xsl:stylesheet name="VYM_TaskJuggler" version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
1.6 +<xsl:output method="text"/>
1.7 +<xsl:template match="node()">
1.8 + <xsl:apply-templates/>
1.9 +</xsl:template>
1.10 +<xsl:template match="/vymmap/mapcenter">
1.11 +project <xsl:value-of select="translate(heading, ' ', '_')"/> "<xsl:value-of select="heading"/>" "1.0" 2002-01-16 2002-05-28 {
1.12 + # Pick a day during the project that will be reported as 'today' in
1.13 + # the project reports. If not specified the current day will be
1.14 + # used, but this will likely be ouside of the project range, so it
1.15 + # can't be seen in the reports.
1.16 + now 2002-03-05-13:00
1.17 + # Hide the clock time. Only show the date.
1.18 + timeformat "%Y-%m-%d"
1.19 + # The currency for all money values is U.S. Dollars.
1.20 + currency "USD"
1.21 +
1.22 + # We want to compare the planned scenario, to one with the actual
1.23 + # scenario
1.24 + scenario plan "Planned" {
1.25 + scenario actual "Actual"
1.26 + }
1.27 +}
1.28 +# The daily default rate of all resources. This can be overriden for each
1.29 +# resource. We specify this, so that we can do a good calculation of
1.30 +# the costs of the project.
1.31 +rate 310.0
1.32 +
1.33 +# This is one way to form teams
1.34 +macro allocate_developers [
1.35 + allocate dev1
1.36 + allocate dev2 { limits { dailymax 4h } }
1.37 + allocate dev3
1.38 +]
1.39 +
1.40 +flags team
1.41 +
1.42 +resource dev "In House" {
1.43 + resource dev1 "Some Guy" { rate 330.00 }
1.44 + resource dev2 "Some Other Guy"
1.45 + resource dev3 "Some Last Guy on Vacation" { vacation 2002-02-01 - 2002-02-05 }
1.46 +
1.47 + flags team
1.48 +}
1.49 +
1.50 +resource misc "Outsource" {
1.51 + resource test "Out Sourcer1" { limits { dailymax 6.4h } rate 240.00 }
1.52 + resource doc "Out Source2" { rate 280.00 vacation 2002-03-11 - 2002-03-16 }
1.53 +
1.54 + flags team
1.55 +}
1.56 +
1.57 +# In order to do a simple profit and loss analysis of the project we
1.58 +# specify accounts. One for the development costs, one for the
1.59 +# documentation costs and one account to credit the customer payments
1.60 +# to.
1.61 +account dev "Development" cost
1.62 +account doc "Documentation" cost
1.63 +account rev "Payments" revenue
1.64 +
1.65 +# Now we specify the work packages. The whole project is described as
1.66 +# a task that contains sub tasks. These sub tasks are then broken down
1.67 +# into smaller tasks and so on. The innermost tasks describe the real
1.68 +# work and have resources allocated to them. Many attributes of tasks
1.69 +# are inherited from the enclosing task. This saves you a lot of
1.70 +# writing.
1.71 +task <xsl:value-of select="translate(heading, ' ', '_')"/> "<xsl:value-of select="heading"/>" {
1.72 +
1.73 + # All work related costs will be booked to this account unless the
1.74 + # sub tasks specifies it differently.
1.75 + account dev
1.76 +
1.77 + <xsl:call-template name="recursive"/>
1.78 +
1.79 +}
1.80 +
1.81 +# This task report is for use with the TaskJuggler GUI
1.82 +taskreport "Project Overview" {
1.83 + columns start, end, effort, duration, completed, status, note, cost, revenue
1.84 + scenario actual
1.85 +}
1.86 +
1.87 +# A resource report for use with the TaskJuggler GUI
1.88 +resourcereport "Resource Usage" {
1.89 + columns effort, freeload, utilization, rate
1.90 + scenario actual
1.91 + hideresource 0
1.92 +}
1.93 +
1.94 +# For conveniance we would like each report to contain links to the
1.95 +# other reports. So we declare a macro with a fragment of raw HTML
1.96 +# code to be embedded into all the HTML reports.
1.97 +macro navbar [
1.98 +rawhead
1.99 + '<table align="center" border="2" cellpadding="10"
1.100 + style="background-color:#f3ebae; font-size:105%">
1.101 + <tr>
1.102 + <td><a href="Tasks-Overview.html">Tasks Overview</a></td>
1.103 + <td><a href="Staff-Overview.html">Staff Overview</a></td>
1.104 + <td><a href="Accounting.html">Accounting</a></td>
1.105 + <td><a href="Calendar.html">Calendar</a></td>
1.106 + </tr>
1.107 + <tr>
1.108 + <td><a href="Tasks-Details.html">Tasks Details</a></td>
1.109 + <td><a href="Staff-Details.html">Staff Details</a></td>
1.110 + <td><a href="Status-Report.html">Status Report</a></td>
1.111 + <td><a href="acso.eps">GANTT Chart (Postscript)</a></td>
1.112 + </tr>
1.113 + </table>
1.114 + <br/>'
1.115 +]
1.116 +
1.117 +# As the first report, we would like to have a general overview of all
1.118 +# tasks with their computed start and end dates. For better
1.119 +# readability we include a calendar like column that lists the effort
1.120 +# for each week.
1.121 +htmltaskreport "Tasks-Overview.html" {
1.122 + # This report should contain the navigation bar we have declared
1.123 + # above.
1.124 + ${navbar}
1.125 + # The report should be a table that contains several columns. The
1.126 + # task and their information form the rows of the table. Since we
1.127 + # don't like the title of the effort column, we change it to "Work".
1.128 + columns hierarchindex, name, duration, effort { title "Work"},
1.129 + start, end, weekly
1.130 + # For this report we like to have the abbreviated weekday in front
1.131 + # of the date. %a is the tag for this.
1.132 + timeformat "%a %Y-%m-%d"
1.133 +
1.134 + # Don't show load values.
1.135 + barlabels empty
1.136 + # Set a title for the report
1.137 + headline "<xsl:value-of select="heading"/> Project"
1.138 + # And a short description what this report is about.
1.139 + caption "This table presents a management-level overview of the project. The values are days or man-days."
1.140 +}
1.141 +
1.142 +# Now a more detailed report that shows all jobs and the people
1.143 +# assigned to the tasks. It also features a comparison of the planned
1.144 +# and actual scenario.
1.145 +htmltaskreport "Tasks-Details.html" {
1.146 + ${navbar}
1.147 + # Now we use a daily calendar.
1.148 + columns no, name, start, end, scenario, daily
1.149 + #start 2002-03-01
1.150 + #end 2002-04-01
1.151 + # Show plan and delayed scenario values.
1.152 + scenarios plan, actual
1.153 + headline "<xsl:value-of select="heading"/> Project - March 2002"
1.154 + caption "This table shows the load of each day for all the tasks.
1.155 + Additionally the resources used for each task are listed. Since the
1.156 + project start was delayed, the delayed schedule differs significantly
1.157 + from the original plan."
1.158 + # Don't hide any resources, that is show them all.
1.159 + hideresource 0
1.160 +}
1.161 +
1.162 +# The previous report listed the resources per task. Now we generate a
1.163 +# report the lists all resources.
1.164 +htmlresourcereport "Staff-Overview.html" {
1.165 + ${navbar}
1.166 + # Add a column with the total effort per task.
1.167 + columns no, name { cellurl "http://www.tj.org" }, scenario, weekly, effort
1.168 + scenarios plan, actual
1.169 + # Since we want to see the load values as hours per week, we switch
1.170 + # the unit that loads are reported in to hours.
1.171 + loadunit hours
1.172 + headline "Weekly working hours for the <xsl:value-of select="heading"/> Project"
1.173 +}
1.174 +
1.175 +# Now a report similar to the above one but with much more details.
1.176 +htmlresourcereport "Staff-Details.html" {
1.177 + ${navbar}
1.178 + columns name, daily, effort
1.179 + # To still keep the report readable we limit it to show only the
1.180 + # data for March 2002.
1.181 + start 2002-01-16
1.182 + end 2002-04-01
1.183 + hidetask 0
1.184 + # The teams are virtual resources that we don't want to see. Since
1.185 + # we have assigned a flag to those virtual resource, we can just
1.186 + # hide them.
1.187 + hideresource team
1.188 + # We also like to have the report sorted alphabetically ascending by
1.189 + # resource name.
1.190 + sortresources nameup
1.191 + loadunit hours
1.192 + headline "Daily working hours for the <xsl:value-of select="heading"/> Project - March 2002"
1.193 +}
1.194 +
1.195 +htmlweeklycalendar "Calendar.html" {
1.196 + ${navbar}
1.197 + headline "Ongoing Tasks - March 2002"
1.198 + start 2002-03-01
1.199 + end 2002-04-01
1.200 +}
1.201 +
1.202 +htmlstatusreport "Status-Report.html" {
1.203 + ${navbar}
1.204 +}
1.205 +
1.206 +# To conclude the HTML reports a report that shows how badly the
1.207 +# project is calculated is generated. The company won't get rich with
1.208 +# this project. Due to the slip, it actually needs some money from the
1.209 +# bank to pay the salaries.
1.210 +htmlaccountreport "Accounting.html" {
1.211 + ${navbar}
1.212 + # Besides the number of the account and the name we have a column
1.213 + # with the total values (at the end of the project) and the values
1.214 + # for each month of the project.
1.215 + columns no, name, scenario, total, monthly
1.216 + headline "P&L for the Accounting Software Project"
1.217 + caption "The table shows the profit and loss
1.218 + analysis as well as the cashflow situation of the Accounting
1.219 + Software Project."
1.220 + # Since this is a cashflow calculation we show accumulated values
1.221 + # per account.
1.222 + accumulate
1.223 + scenarios plan, actual
1.224 +}
1.225 +
1.226 +# Finally we generate an XML report that contains all info about the
1.227 +# scheduled project. This will be used by tjx2gantt to create a nice
1.228 +# Gantt chart of our project.
1.229 +xmlreport "<xsl:value-of select="translate(heading, ' ', '_')"/>.tjx" {
1.230 +# version 2
1.231 +}
1.232 +</xsl:template>
1.233 +<xsl:template name="recursive">
1.234 + <xsl:for-each select="branch">
1.235 + task <xsl:value-of select="translate(heading, ' ', '_')"/> "<xsl:value-of select="heading"/>" {
1.236 + # I've included all of the Optional Attributes here.
1.237 + # Commented out for your pleasure.
1.238 + #account
1.239 + #allocate dev1
1.240 + #complete
1.241 + #depends
1.242 + #duration
1.243 + #effort 20d
1.244 + #endbuffer
1.245 + #endcredit
1.246 + #end, flags
1.247 + #journalentry
1.248 + #length
1.249 + #maxend
1.250 + #maxstart
1.251 + #milestone
1.252 + #minend
1.253 + #minstart
1.254 + #note
1.255 + #precedes
1.256 + #priority
1.257 + #projectid
1.258 + #reference
1.259 + #responsible
1.260 + #scheduled
1.261 + #scheduling
1.262 + #shift
1.263 + #startbuffer
1.264 + #startcredit
1.265 + plan:start 2002-03-05
1.266 + actual:start 2002-03-05
1.267 + #statusnote
1.268 + #supplement
1.269 + <xsl:call-template name="recursive"/>
1.270 + }
1.271 + </xsl:for-each>
1.272 +</xsl:template>
1.273 +</xsl:stylesheet>
1.274 \ No newline at end of file