Changes between Version 23 and Version 24 of SumStatsPlugin
- Timestamp:
- Mar 18, 2015, 4:37:19 PM (9 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
SumStatsPlugin
v23 v24 1 1 [[PageOutline(2-5,Contents,pullout)]] 2 2 3 = Sums specified field in Roadmap and Milestone stats =3 = Sums specified field in Roadmap and Milestone stats 4 4 5 '''UPDATE (2 Jan 2012)''': This plugin now also provides a [http://code.google.com/apis/chart/ Google Visualization API] data source that can populate a burndown chart on milestone pages such as provided by the Trac [wiki:VisualizationPlugin#Burndownchartonmilestonepages Visualization plugin]. 5 '''UPDATE (2 Jan 2012)''': This plugin now also provides a [http://code.google.com/apis/chart/ Google Visualization API] data source that can populate a burndown chart on milestone pages such as provided by the Trac [wiki:VisualizationPlugin#Burndownchartonmilestonepages Visualization plugin]. See more details [wiki:SumStatsPlugin#GoogleVisualizationAPIDataSource-forBurndownChart below]. 6 6 7 == Description ==7 == Description 8 8 9 This is a complement to the [wiki:SumFieldsPlugin 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.9 This is a complement to the [wiki:SumFieldsPlugin 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. 10 10 11 11 [[Image(sumstats.png, border=1)]] 12 12 13 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.13 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, this plugin was designed to be backward compatible with the default ticket count behavior, so that you can utilise as much or as little of its enhancements as required. 14 14 15 The plugin also provides a [http://code.google.com/apis/chart/ Google Visualization API] data source at {{{/sumstats/query}}} that can populate a burndown chart. 15 The plugin also provides a [http://code.google.com/apis/chart/ Google Visualization API] data source at {{{/sumstats/query}}} that can populate a burndown chart. See [wiki:SumStatsPlugin#GoogleVisualizationAPIDataSource-forBurndownChart below] for an example. 16 16 17 == Configuration == 18 1. Install the plugin (after downloading and unzipping): 17 == Bugs/Feature Requests 18 19 Existing bugs and feature requests for SumStatsPlugin are 20 [report:9?COMPONENT=SumStatsPlugin here]. 21 22 If you have any issues, create a 23 [http://trac-hacks.org/newticket?component=SumStatsPlugin&owner=robguttman new ticket]. 24 25 [[TicketQuery(component=SumStatsPlugin&group=type,format=progress)]] 26 27 == Download 28 29 Download the zipped source from [download:sumstatsplugin here]. 30 31 == Source 32 33 You can check out SumStatsPlugin from [http://trac-hacks.org/svn/sumstatsplugin here] using Subversion, or [source:sumstatsplugin browse the source] with Trac. 34 35 == Installation and Configuration 36 37 1. Install the plugin, after downloading and unzipping: 19 38 {{{ 39 #!sh 20 40 cd sumstatsplugin/0.12 21 41 sudo python setup.py install 22 42 }}} 23 43 24 See [http://trac.edgewall.org/wiki/TracPlugins TracPlugins] for more installation details and options. You'll likely need to restart Trac's web server after installation.44 See [http://trac.edgewall.org/wiki/TracPlugins TracPlugins] for more installation details and options. You will likely need to restart Trac's web server after installation. 25 45 26 2. Enable the plugin in {{{trac.ini}}}:46 2. Enable the plugin in `trac.ini`: 27 47 {{{ 48 #!ini 28 49 [components] 29 50 sumstats.* = enabled 30 51 }}} 31 52 32 53 You can alternatively use the Trac Web Admin GUI. 33 54 34 3. Replace the {{{DefaultTicketGroupStatsProvider}}} with this plugin's new {{{SumTicketGroupStatsProvider}}} as shown here:55 3. Replace the {{{DefaultTicketGroupStatsProvider}}} with this plugin's new {{{SumTicketGroupStatsProvider}}} in `trac.ini`: 35 56 {{{ 57 #!ini 36 58 [roadmap] 37 59 stats_provider = SumTicketGroupStatsProvider … … 41 63 }}} 42 64 43 4. (Optional) Configure the main {{{sumstats}}} section :65 4. (Optional) Configure the main {{{sumstats}}} section in `trac.ini`:: 44 66 {{{ 67 #!ini 45 68 [sumstats] 46 69 field = effort … … 51 74 }}} 52 75 53 The optional {{{field}}} option specifies which field to sum. The optional {{{drilldown_label}}} and {{{label}}} options are used to define the {{{TicketGroupStats}}} object. The optional {{{filter}}} is a list of additional global filters for all groups (if specified it's currently limited to standard fields only). The optional {{{query_args}}} is a convenient, comma-delimited list that gets appended to each group's {{{query_args}}}.See the examples below for more details.76 The optional {{{field}}} option specifies which field to sum. The optional {{{drilldown_label}}} and {{{label}}} options are used to define the {{{TicketGroupStats}}} object. The optional {{{filter}}} is a list of additional global filters for all groups (if specified it's currently limited to standard fields only). The optional {{{query_args}}} is a convenient, comma-delimited list that gets appended to each group's {{{query_args}}}. See the examples below for more details. 54 77 55 5. (Optional) Install the [http://code.google.com/apis/chart/interactive/docs/dev/gviz_api_lib.html Google Visualization API python gviz client library] if using as a data source (see [wiki:SumStatsPlugin#GoogleVisualizationAPIDataSource-forBurndownChart below]).78 5. (Optional) Install the [http://code.google.com/apis/chart/interactive/docs/dev/gviz_api_lib.html Google Visualization API python gviz client library] if using as a data source, see [wiki:SumStatsPlugin#GoogleVisualizationAPIDataSource-forBurndownChart below]. 56 79 80 == Examples 57 81 58 == Bugs/Feature Requests ==82 === Combining resolution and phase fields 59 83 60 Existing bugs and feature requests for SumStatsPlugin are 61 [report:9?COMPONENT=SumStatsPlugin here]. 62 63 If you have any issues, create a 64 [http://trac-hacks.org/newticket?component=SumStatsPlugin&owner=robguttman new ticket]. 65 66 == Download == 67 68 Download the zipped source from [download:sumstatsplugin here]. 69 70 == Source == 71 72 You can check out SumStatsPlugin from [http://trac-hacks.org/svn/sumstatsplugin here] using Subversion, or [source:sumstatsplugin browse the source] with Trac. 73 74 == Examples == 75 76 === Combining resolution and phase fields === 77 Here's an example {{{trac.ini}}} config that combines a custom {{{phase}}} field with a standard {{{resolution}}} field: 84 Here is a sample `trac.ini` file that combines a custom {{{phase}}} field with a standard {{{resolution}}} field: 78 85 {{{ 86 #!ini 79 87 [milestone-groups] 80 88 closed = fixed … … 105 113 }}} 106 114 107 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).115 This 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. 108 116 109 === Burndown chart data source === 110 This plugin also provides a [http://code.google.com/apis/chart/ Google Visualization API] data source using the [http://code.google.com/apis/chart/interactive/docs/dev/gviz_api_lib.html python gviz client library] (which must be installed separately) that can populate a daily, agile-style [http://en.wikipedia.org/wiki/Burn_down_chart burndown chart]. Being a standard Google Visualization API data source, it can be accessed and visualized anywhere. However, it can also display burndown charts on Trac milestone pages by using the Trac [wiki:VisualizationPlugin#Burndownchartonmilestonepages Visualization plugin] - for example: 117 === Burndown chart data source 118 119 This plugin also provides a [http://code.google.com/apis/chart/ Google Visualization API] data source using the [http://code.google.com/apis/chart/interactive/docs/dev/gviz_api_lib.html python gviz client library] (which must be installed separately) that can populate a daily, agile-style [http://en.wikipedia.org/wiki/Burn_down_chart burndown chart]. Being a standard Google Visualization API data source, it can be accessed and visualized anywhere. However, it can also display burndown charts on Trac milestone pages by using the Trac [wiki:VisualizationPlugin#Burndownchartonmilestonepages Visualization plugin], for example: 111 120 112 121 [[Image(burndown.png)]] 113 122 114 The data source reuses the {{{filter}}} option set in the {{{[sumstats]}}} section. See step 4 of the [wiki:SumStatsPlugin#Configuration Configuration section above] for more details. No additional configuration is required to enable the burndown data source.However, it currently makes the following assumptions:123 The data source reuses the {{{filter}}} option set in the {{{[sumstats]}}} section. See step 4 of the [wiki:SumStatsPlugin#Configuration Configuration section above] for more details. No additional configuration is required to enable the burndown data source. However, it currently makes the following assumptions: 115 124 116 125 * "done" means closed as {{{fixed}}} … … 120 129 The data is accessed at: 121 130 122 http://<your-trac-domain>/sumstats/query 131 `http://<your-trac-domain>/sumstats/query` 123 132 124 The above request returns a data table (in jsonresponse format) of up to four columns:133 The above request returns a data table (in JSON response format) of up to four columns: 125 134 126 135 * {{{day}}} - the day … … 129 138 * {{{done}}} - the completed (i.e., closed as {{{fixed}}}) sum or count for the day 130 139 131 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):140 The default response includes the {{{day}}}, {{{todo}}} and {{{done}}} fields in that order. To change which fields are returned and/or their order, eg to display the data in alternatively configured charts, you can add a (partial) query, ie the {{{tq}}} portion below: 132 141 133 http://<your-trac-domain>/sumstats/query?tq=select total,done 142 `http://<your-trac-domain>/sumstats/query?tq=select total,done` 134 143 135 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.144 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. 136 145 137 Let me know if you need additional flexibility in the query and I'll consider adding it (e.g., specifying the milestone explicitly, a different timeframe grouping than daily, etc.).146 Let me know if you need additional flexibility in the query and I'll consider adding it. For example, ways to specify the milestone explicitly, a different timeframe grouping than daily, etc. 138 147 139 == Recent Changes ==148 == Recent Changes 140 149 141 150 [[ChangeLog(sumstatsplugin, 3)]] 142 151 143 == Author/Contributors ==152 == Author/Contributors 144 153 145 154 '''Author:''' [wiki:robguttman] [[BR]] 146 '''Maintainer:''' [ wiki:robguttman] [[BR]]155 '''Maintainer:''' [[Maintainer]] [[BR]] 147 156 '''Contributors:'''