| 31 | == Configuration == |
| 32 | |
| 33 | Trac-jsGantt is intended to be flexible enough to get data from various plugins by configuring the field names for those plugins in `trac.ini`. It is known to work with TimingAndEstimationPlugin (for estimated and total hours), MasterTicketsPlugin (for FS dependencies), and [http://github.com/itota/trac-subtickets-plugin Subtickets] for parent/child relationships. Custom fields for start and finish date are also supported. |
| 34 | |
| 35 | Tasks are colored based on ticket priority consistent with the colors used in Trac reports. |
| 36 | |
| 37 | Your `trac.ini` may include: |
| 38 | |
| 39 | {{{ |
| 40 | [trac-jsgantt] |
| 41 | fields.estimate = estimatedhours |
| 42 | fields.worked = totalhours |
| 43 | fields.pred = blockedby |
| 44 | fields.succ = blocking |
| 45 | fields.parent = parents |
| 46 | fields.start = userstart |
| 47 | fields.finish = userfinish |
| 48 | date_format = %Y-%m-%d |
| 49 | milestone_type = milestone |
| 50 | }}} |
| 51 | |
| 52 | All of the `fields.*` items name custom fields which may contain data for the Gantt. |
| 53 | |
| 54 | When `estimate` and `worked` are both configured, the plugin attempts to display (100 * worked/estimate) as the percent complete. The example works with TimingAndEstimationPlugin. Alternatively, if `percent` is configured, the plugin attempts to display it as the percent complete (it should be a number from 0 to 100). If none of those are configured, all tasks will be marked as 0% complete. |
| 55 | |
| 56 | When `pred` and `succ` are configured the plugin uses them to determine the task dependencies. The example works with MasterTickets plugin. If these fields are not configured, no dependencies are shown. |
| 57 | |
| 58 | When `parent` is configured, it is the field which holds the parent ticket number. The example works with Subtickets. If this field is not configured, no parent/child relationship will be displayed. If it is configured, the Gantt can be collapsed by the user to show or hide subtasks. |
| 59 | |
| 60 | When `start` and `finish` are configured, the plugin uses them to set task start and finish dates. The `date_format` field is a Python `strptime()` format specifier which describes the contents of `start` and `finish`. If these fields are not configured, all tasks end today and have a 1-day duration. |
| 61 | |
| 62 | The `milestone_type` may be used to have a custom ticket type show up as milestones on the chart. If this field is not specified, only Trac milestones are displayed as milestones. |
| 63 | |
| 64 | == Arguments == |
| 65 | |
| 66 | The chart display can be controlled with a number of macro arguments: |
| 67 | |
| 68 | * format - Initial display format: day (default), week, month, or quarter |
| 69 | * sample - Display sample tasks (1) or not (0; default) |
| 70 | * res - Show resource column (1; default) or not (0) |
| 71 | * dur - Show duration colunn (1; default) or not (0) |
| 72 | * comp - Show percent complete column (1; default) or not (0) |
| 73 | * caption - Caption to place to right of tasks: None, Caption, Resource (default), Duration, %Complete |
| 74 | * startDate - Show start date column (1; default) or not (0) |
| 75 | * endDate - Show end date column (1; default) or not (0) |
| 76 | * dateDisplay - Date display format: 'mm/dd/yyyy' (default), 'dd/mm/yyyy', or 'yyyy-mm-dd' |
| 77 | * openLevel - Number of levels of tasks to show. 1 = only top level task. 999 is the default. |
| 78 | |
| 79 | All other macro arguments are treated as TracQuery specification (e.g., milestone=MS1|MS2) to control which tickets are displayed. |
| 80 | |
| 81 | == Known issues == |
| 82 | |
| 83 | 1. Ticket status and type are not displayed. |
| 84 | |
| 85 | == Planned enhancements == |
| 86 | |
| 87 | 1. Allow coloring of tasks by severity, milestone, or owner. |
| 88 | 1. Allow configuration of default task duration. |
| 89 | |