Version 16 (modified by 12 years ago) (diff) | ,
---|
Contents
Sums specified field in Roadmap and Milestone stats
Notice: This plugin is unmaintained and available for adoption.
UPDATE (2 Jan 2012): This plugin now also provides a Google Visualization API data source that can populate a burndown chart on milestone pages such as provided by the Trac Visualization plugin. See more details below.
Description
This is a complement to the Sum Fields plugin which sums fields in a query or report. This plugin sums fields for the roadmap and milestone views. These plugins are useful when assessing progress based on "points" or "ideal days" of effort instead of ticket count.
This plugin was inspired by the CustomRoadmapPlugin but overcomes its limitation of requiring a patch. Additionally, this plugin allows for any field to be used to define a group, not just the default status
field. Lastly, I designed the plugin to be backwards compatible with the default ticket count behavior so that you can leverage as much or little of its enhancements as desired.
The plugin also provides a Google Visualization API data source at /sumstats/query
that can populate a burndown chart. See below for an example.
Configuration
- Install the plugin (after downloading and unzipping):
cd sumstatsplugin/0.12 sudo python setup.py install
See TracPlugins for more installation details and options. You'll likely need to restart Trac's web server after installation.
- Enable the plugin in
trac.ini
:[components] sumstats.* = enabled
You can alternatively use the Trac Web Admin GUI.
- Replace the
DefaultTicketGroupStatsProvider
with this plugin's newSumTicketGroupStatsProvider
as shown here:[roadmap] stats_provider = SumTicketGroupStatsProvider [milestone] stats_provider = SumTicketGroupStatsProvider
- (Optional) Configure the main
sumstats
section:[sumstats] field = effort label = effort drilldown_label = Ticket effort filter = type!=epic query_args = col=summary,col=type,col=effort
The optional
field
option specifies which field to sum. The optionaldrilldown_label
andlabel
options are used to define theTicketGroupStats
object. The optionalfilter
is a list of additional global filters for all groups (if specified it's currently limited to standard fields only). The optionalquery_args
is a convenient, comma-delimited list that gets appended to each group'squery_args
. See the examples below for more details.
- (Optional) Install the Google Visualization API python gviz client library if using as a data source (see below).
Bugs/Feature Requests
Existing bugs and feature requests for SumStatsPlugin are here.
If you have any issues, create a new ticket.
Download
Download the zipped source from [download:sumstatsplugin here].
Source
You can check out SumStatsPlugin from here using Subversion, or browse the source with Trac.
Example
Here's an example trac.ini
config that combines a custom phase
field with a built-in resolution
field:
[milestone-groups] closed = fixed closed.field = resolution closed.label = fixed closed.order = 1 closed.overall_completion = true readying = * readying.field = phase readying.order = 2 readying.color = YellowGreen implementation = implementation implementation.field = phase implementation.order = 3 implementation.color = Yellow waiting = waiting waiting.field = phase waiting.order = 4 waiting.color = White scoping = sizing,definition scoping.field = phase scoping.order = 5 scoping.color = Red
In general, the plugin maintains the same syntax and semantics as the DefaultTicketGroupStatsProvider
to support backwards compatibility and ease of transition. If the .field
option is omitted, then the status
field is presumed. Note that a .color
option is required for each group (except for any default closed
or new
group you have). The "catch all" *
value is also still supported (although there are currently no checks for duplicate "catch all" or otherwise redundant group definitions).
Google Visualization API Data Source - for Burndown Chart
This plugin also provides a Google Visualization API data source using the python gviz client library (which must be installed separately) that can populate a daily burndown chart. The Visualization plugin can be used to display the burndown chart on milestone pages - for example:
The data source reuses the filter
option set in the [sumstats]
section.
No additional configuration is required to enable the burndown data source. It is accessed at:
http://<your-trac-domain>/sumstats/query
The above request returns a data table (in json response format) of up to four columns:
day
- the daytotal
- the total sum or count for the day (both losed asfixed
and not closed)todo
- the remaining (i.e., not closed) sum or count for the daydone
- the completed (i.e., closed asfixed
) sum or count for the day
The default response includes the day
, todo
, and done
fields in that order. To change which fields are returned and/or their order (e.g., to display the data in alternatively configured charts), you can add a (partial) query (i.e., the tq
portion below):
http://<your-trac-domain>/sumstats/query?tq=select total,done
Only the select phrase is used at this time to specify which columns to return and their order. The day
field is always the first column and should be omitted from the select phrase. You may need to urlencode the tq
value.
Let me know if you need additional flexibility in the query and I'll consider adding it.
Recent Changes
- 15069 by rjollos on 2015-11-25 19:40:43
-
0.9.1dev: Fix traceback when
overall_completion
isNone
The issue occurs in Trac 0.12 -
as_bool
was not as
robust as in later versions of Trac.
Fixes #12589.
- 14026 by rjollos on 2014-07-25 11:31:38
-
Changed license to 3-Clause BSD with permission of author. Refs #11832.
- 13559 by jun66j5 on 2014-01-08 21:36:13
-
Removed duplicated definitions of option to fix hidden documentation for
filter
onTracIni
macro (fixed #11480)
(more)
Author/Contributors
Author: robguttman
Maintainer: robguttman
Contributors:
Attachments (2)
- sumstats.png (29.1 KB) - added by 12 years ago.
- burndown.png (22.9 KB) - added by 12 years ago.
Download all attachments as: .zip