Changes between Version 50 and Version 51 of TracJsGanttPlugin


Ignore:
Timestamp:
Mar 9, 2015, 1:08:52 PM (9 years ago)
Author:
figaro
Comment:

Cosmetic changes

Legend:

Unmodified
Added
Removed
Modified
  • TracJsGanttPlugin

    v50 v51  
    11[[PageOutline(2-5,Contents,pullout)]]
    22
    3 = Trac jsGantt plugin =
    4 
    5 == Description ==
     3= Display a ​jsGantt chart in a wiki page
     4
     5== Description
    66
    77A plugin which allows Trac ticket data to be displayed in a [http://jsgantt.com jsGantt] chart in a wiki page.  Tasks and milestones are links to the corresponding ticket or milestone.
     
    1111Over time, the project management aspects of the Gantt chart have been isolated in the `TracPM` module which has grown to include a query helper (which allows finding tickets based on dependencies) and a ticket change listener (which reschedules tickets based on various constraints) and other support functions.  Ultimately, these features -- which really have nothing to do with the Gantt chart -- will be moved to a separate `TracPM` plugin.
    1212
    13 == Usage ==
    14 
    15 `[[TracJSGanttChart(sample=1)]]` displays the sample project from jsgantt.com.  `[[TracJSGanttChart(milestone=Test)]]` displays all the tickets in the Test milestone.
     13== Examples
     14
     15`[[TracJSGanttChart(sample=1)]]` displays the sample project from jsgantt.com. `[[TracJSGanttChart(milestone=Test)]]` displays all the tickets in the Test milestone.
    1616
    1717[[Image(jsGanttSample.PNG)]]
     
    2323`[[TracJSGanttChart(scheduled=1,display=owner:chrisn)]]` find all the scheduled tickets and display only those owned by user `chrisn`.
    2424
    25 
    26 === Arguments ===
    27 
    28 The chart display can be controlled with a number of macro arguments:
     25=== Arguments
     26
     27The chart display can be controlled with the following macro arguments:
    2928
    3029||'''Argument'''  ||'''Version'''  ||'''Description'''  ||'''Default'''
    3130|| `caption`|| ||Caption to place to right of tasks: None, `Caption`, `Resource`, `Duration`, `Complete` || `Resource` ||
    3231|| `comp`|| ||Show (`1`) percent complete column, or do not (`0`). ||  `1`  ||
    33 || `colorBy`|| ||Field to use to color tasks. Useful fields are `priority`, `owner` and `milestone` but any field can be used. When colored by `priority` colors  are consistent with the colors used in Trac reports. Other coloring choices (e.g., by `milestone` or `owner`) use arbitrary, unique colors. || `priority` ||
     32|| `colorBy`|| ||Field to use to color tasks. Useful fields are `priority`, `owner` and `milestone` but any field can be used. When colored by `priority` colors  are consistent with the colors used in Trac reports. Other coloring choices, eg by `milestone` or `owner`, use arbitrary, unique colors. || `priority` ||
    3433|| `dateDisplay`|| ||Format to display dates: `mm/dd/yyyy`, `dd/mm/yyyy`, or `yyyy-mm-dd` ||  `mm/dd/yyyy`  ||
    3534|| `display`||0.10||Filter for limiting display of tickets.  `owner:fred` shows only tickets owned by fred. `status:closed` shows only closed tickets.||None||
     
    4039|| `format`|| ||Initial display format, one of those listed in `formats` ||  `day`  ||
    4140|| `formats`||||Formats to show for Gantt chart.  A pipe-separated list of `minute`, `hour`, `day`, `week`, `month`, and `quarter`. || `day|week|month|quarter` ||
    42 || `goal`|| 0.9 ||Ticket(s) to show predecessors of. When using something like MasterTicketsPlugin to maintain ticket dependencies, you may create a Gantt showing a ticket and all of its predecessors with `goal=<ticket#>`.  The macro uses the configured `succ` field to find all predecessor tasks and build an `id=` argument for Trac's native query handler.[[br]][[br]]Multiple goals may be provided like `goal=1|12|32`.[[br]][[br]]When used in a ticket description or comment, `goal=self` will display the current ticket's predecessors.||  None ||
     41|| `goal`|| 0.9 ||Ticket(s) to show predecessors of. When using something like MasterTicketsPlugin to maintain ticket dependencies, you may create a Gantt showing a ticket and all of its predecessors with `goal=<ticket#>`. The macro uses the configured `succ` field to find all predecessor tasks and build an `id=` argument for Trac's native query handler.[[br]][[br]]Multiple goals may be provided like `goal=1|12|32`.[[br]][[br]]When used in a ticket description or comment, `goal=self` will display the current ticket's predecessors.||  None ||
    4342|| `hoursPerDay`|| ||Hours worked per day ||  `8.0`  ||
    44 || `lwidth`|| ||Width (in pixels) of left table (The one contains task names, etc. on the left of the Gantt chart.) ||  None  ||
     43|| `lwidth`|| ||Width (in pixels) of left table. The one contains task names, etc. on the left of the Gantt chart. ||  None  ||
    4544|| `omitMilestones`||0.8||Show milestones for displayed tickets (`0`) or only those specified by `milestone=` (`1`). ||  `0`  ||
    4645|| `openLevel`|| ||How many levels of task hierarchy to show open.  `1` = only top level task.  ||  `999`  ||
    4746|| `res`|| ||Show (`1`) resource column, or do not (`0`). ||  `1`  ||
    48 || `root`|| ||Ticket(s) to show descendants of. When using something like Subtickets plugin to maintain a tree of tickets and subtickets, you may create a Gantt showing a ticket and all of its descendants with `root=<ticket#>`.  The macro uses the configured `parent` field or `parentchild` relation to find all descendant tasks and build an `id=` argument for Trac's native query handler.[[br]][[br]]Multiple roots may be provided like `root=1|12|32`.[[br]][[br]]When used in a ticket description or comment, `root=self` will display the current ticket's descendants.||  None  ||
     47|| `root`|| ||Ticket(s) to show descendants of. When using something like Subtickets plugin to maintain a tree of tickets and subtickets, you may create a Gantt showing a ticket and all of its descendants with `root=<ticket#>`. The macro uses the configured `parent` field or `parentchild` relation to find all descendant tasks and build an `id=` argument for Trac's native query handler.[[br]][[br]]Multiple roots may be provided like `root=1|12|32`.[[br]][[br]]When used in a ticket description or comment, `root=self` will display the current ticket's descendants.||  None  ||
    4948|| `sample`|| ||Display (`1`) sample tasks in Gantt, or do not (`0`) ||  `0`  ||
    5049|| `schedule`|| ||Schedule algorithm: as-last-as-possible (`alap`) or as-soon-as-possible (`asap`) ||  `alap`  ||
     
    5251|| `startDate`|| ||Show (`1`) start date column, or do not (`0`). ||  `1`  ||
    5352|| `userMap`||0.8||Map (`1`) user IDs to full names, or do not (`0`). ||  `1`  ||
    54 || `order`||||Order of fields used to sort tickets before display. `order=milestone` sorts by milestone.  May include ticket fields, including custom fields, or "wbs" (work breakdown structure).||wbs||
    55 || `scrollTo`||||Date to scroll to when chart is initially drawn.  A date in `yyyy-mm-dd` format or "today".||None||
     53|| `order`||||Order of fields used to sort tickets before display. `order=milestone` sorts by milestone. May include ticket fields, including custom fields, or "wbs" (work breakdown structure).||wbs||
     54|| `scrollTo`||||Date to scroll to when chart is initially drawn. A date in `yyyy-mm-dd` format or "today".||None||
    5655|| `linkStyle`||||How to handle clicks on task in the chart. JSGantt style opening a dedicated window (`jsgantt`) or standard ticket link behaviour (`standard`).||`jsgantt`||
    5756
    58 Site-wide defaults for macro arguments may be set in the `[trac-jsgantt]` section of `trac.ini`. Where `option.<opt>` overrides the built-in default for `<opt>` from the table above.
    59 
    60 All other macro arguments are treated as TracQuery specification (e.g., `milestone=MS1|MS2`) to control which tickets are displayed.
    61 
    62 == Interfaces ==
    63 
    64 The TracPM module provides several interfaces that can be implemented to adapt the Project Management (PM) features to local business rules.  (The TracPM module will be a separate plugin in the future.) These interfaces are defined in `pmapi.py`.
    65 
    66 === ITaskSorter ===
     57Site-wide defaults for macro arguments may be set in the `[trac-jsgantt]` section of `trac.ini`, where `option.<opt>` overrides the built-in default for `<opt>` from the table above.
     58
     59All other macro arguments are treated as TracQuery specification, eg `milestone=MS1|MS2`, to control which tickets are displayed.
     60
     61== Interfaces
     62
     63The TracPM module provides several interfaces that can be implemented to adapt the Project Management (PM) features to local business rules.  The TracPM module will be a separate plugin in the future. These interfaces are defined in `pmapi.py`.
     64
     65=== ITaskSorter
    6766
    6867TracPM defers decisions about ticket ordering to an `ITaskSorter` implementation.
     
    8786}}}
    8887
    89 ==== Provided Implementations ====
     88==== Provided Implementations
    9089
    9190TracPM provides two implementations of `ITaskSorter`:
     
    10099`SimpleSorter` is used by default if no sorter is enabled in `trac.ini`.
    101100
    102 ==== Support Functions ====
     101==== Support Functions
    103102
    104103`SimpleSorter` and `ProjectSorter` are both derived from `BaseSorter` which provides several functions which may be useful in implementing custom sorters.
     
    108107 * `compareOneField(field, t1, t2)` compares two tickets based on just one field.
    109108
    110 === IResourceCalendar ===
     109=== IResourceCalendar
    111110
    112111TracPM defers decisions about resource availability to an `IResourceCalendar` implementation.
     
    123122}}}
    124123
    125 ==== Provided Implementations ====
     124==== Provided Implementations
    126125
    127126TracPM provides one implementation of `IResourceCalendar`
     
    132131TeamCalendarPlugin provides an implementation which returns 0 hours for any day that a developer is marked unavailable in the calendar.
    133132
    134 === ITaskScheduler ===
    135 
    136 An interface for task schedulers exists but it not yet well documented.
     133=== ITaskScheduler
     134
     135An interface for task schedulers exists, but is not yet well documented.
    137136
    138137{{{
     
    150149}}}
    151150
    152 == Scheduling ==
     151== Scheduling
    153152
    154153If the `TicketRescheduler` module is enabled, `TracPM` maintains private tables with task scheduling information. The `schedule` table has the current schedule:
     
    165164}}}
    166165
    167 The `schedule_change` table holds a record of changes in the schedule over time.
     166The `schedule_change` table holds a record of changes in the schedule over time:
    168167
    169168{{{
     
    182181}}}
    183182
    184 It is possible -- but not yet supported -- to use the data in `schedule_change` to reconstruct a baseline schedule for an effective date and then report changes from that baseline.
     183It is possible, but not yet supported, to use the data in `schedule_change` to reconstruct a baseline schedule for an effective date and then report changes from that baseline.
    185184
    186185These tables are maintained by a ticket change listener which looks for changes to fields which might affect schedule then:
     
    192191 * writes any changes to `schedule` (updating history in `schedule_change`)
    193192
    194 With this data in place, you can show a Gantt of scheduled tickets with dates as in the database (`[[TracJSGanttChart(scheduled=1)]]`) or create reports of the scheduled tickets.
     193With this data in place, you can show a Gantt chart of scheduled tickets with dates as in the database (`[[TracJSGanttChart(scheduled=1)]]`) or create reports of the scheduled tickets.
    195194
    196195{{{
     
    204203   est.value as est,
    205204   act.value as act,
    206    -- This bit is specific to Postgres.
    207    (SELECT to_date(to_timestamp((sched.finish/1000000))::text,
    208                                 'YYYY-MM-DD')) AS due,
     205   -- This bit is specific to PostgreSQL
     206   (SELECT to_date(to_timestamp((sched.finish/1000000))::text, 'YYYY-MM-DD')) AS due,
    209207   status
    210208FROM ticket AS t
     
    219217}}}
    220218
    221 == Installation ==
    222 
    223 
     219== Installation
     220
     221The following installation steps apply:
    224222 1. '''Install''' globally with:
    225223{{{#!sh
     
    317315 1. '''Restart''' web server on command line:
    318316 {{{#!sh
    319 $ sudo /etc/init.d/apache2 restart
    320 }}}
    321 
    322 === Configuration details ===
    323 
    324 !TracJsGanttPlugin 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 SubticketsPlugin for parent/child relationships. Custom fields for start and finish date are also supported.
     317sudo /etc/init.d/apache2 restart
     318}}}
     319
     320== Configuration
     321
     322!TracJsGanttPlugin is intended to be flexible enough to get data from 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 SubticketsPlugin for parent/child relationships. Custom fields for start and finish date are also supported.
    325323
    326324All of the `fields.*` items name custom fields which may contain data for the Gantt.
    327325
    328  * When `fields.estimate` and `fields.worked` are both configured, the plugin attempts to display (100 * `fields.worked`/`fields.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.
    329 
    330  * When `fields.pred` and `fields.succ` are configured the plugin uses them to determine the task dependencies. The example works with MasterTicketsPlugin.  If these fields are not configured, no dependencies are shown.
    331 
    332  * When `fields.parent` is configured, it is the field which holds the parent ticket number.  The example works with SubticketsPlugin.  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.  (`parent_format` determines the format of the content of the `parent` field.  Use "%s" (default) for SubticketsPlugin, or "#%s" for ChildTicketsPlugin.)
    333 
    334  * When `fields.start` and `fields.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 `fields.start` and `fields.finish`. If these fields are not configured, all tasks end today and have a 1-day duration.
    335 
    336  * When `fields.estimate` and `fields.finish` are both configured (and `fields.start` is not configured or not on the ticket), the plugin attempts to determine the start of the task from `fields.finish` and `fields.estimate` as `start = fields.finish - fields.estimate` with consideration for weekends and hours per day.
    337 
    338  * The `goal_ticket_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.
    339 
    340 == Bugs/Feature Requests ==
     326 * When `fields.estimate` and `fields.worked` are both configured, the plugin attempts to display (100 * `fields.worked`/`fields.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.
     327
     328 * When `fields.pred` and `fields.succ` are configured the plugin uses them to determine the task dependencies. The example works with MasterTicketsPlugin. If these fields are not configured, no dependencies are shown.
     329
     330 * When `fields.parent` is configured, it is the field which holds the parent ticket number. The example works with SubticketsPlugin. 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. The `parent_format` determines the format of the content of the `parent` field. Use "%s" (default) for SubticketsPlugin, or "#%s" for ChildTicketsPlugin.
     331
     332 * When `fields.start` and `fields.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 `fields.start` and `fields.finish`. If these fields are not configured, all tasks end today and have a 1-day duration.
     333
     334 * When `fields.estimate` and `fields.finish` are both configured, and `fields.start` is not configured or not on the ticket, the plugin attempts to determine the start of the task from `fields.finish` and `fields.estimate` as `start = fields.finish - fields.estimate` with consideration for weekends and hours per day.
     335
     336 * The `goal_ticket_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.
     337
     338== Bugs/Feature Requests
    341339
    342340Existing bugs and feature requests for !TracJsGanttPlugin are [report:9?COMPONENT=TracJsGanttPlugin here].
     
    344342If you have any issues, create a [/newticket?component=TracJsGanttPlugin&owner=ChrisNelson new ticket].
    345343
    346 === Known issues ===
    347 
     344[[TicketQuery(component=TracJsGanttPlugin&group=type,format=progress)]]
     345
     346=== Known issues
     347
     348The following is a list of known issues:
    348349[[TicketQuery(status=accepted&status=assigned&status=new&status=reopened&type=defect&component=TracJsGanttPlugin&col=id&col=summary&col=component&col=status&col=owner&col=type&col=priority&order=priority)]]
    349350
    350 === Planned enhancements ===
    351 
    352  1. Display a legend of task colors and their meaning (e.g., which milestone or owner they represent).
     351=== Planned enhancements
     352
     353 1. Display a legend of task colors and their meaning, eg which milestone or owner they represent.
    353354 1. Allow some tasks to be open or closed by default.
    354  1. Display critical path
    355  1. Display slack time
    356 
    357 == Source & Download ==
     355 1. Display critical path.
     356 1. Display slack time.
     357
     358== Source & Download
    358359
    359360You can check out !TracJsGanttPlugin from [http://trac-hacks.org/svn/tracjsganttplugin here] using Subversion, or [source:tracjsganttplugin browse the source] with Trac.
     
    361362Download the zipped source from [download:tracjsganttplugin here].
    362363
    363 === Recent Changes ===
    364 
    365 [[ChangeLog(tracjsganttplugin, 10)]]
    366 
    367 == Author/Contributors ==
     364=== Recent Changes
     365
     366[[ChangeLog(tracjsganttplugin, 3)]]
     367
     368== Author/Contributors
    368369
    369370'''Author:''' [wiki:ChrisNelson] [[BR]]
    370 '''Maintainer:''' [wiki:ChrisNelson] [[BR]]
     371'''Maintainer:''' [[Maintainer]] [[BR]]
    371372'''Contributors:''' [wiki:rjollos], [wiki:bof], Matt Sable