Changes between Version 72 and Version 73 of TimeTracking
- Timestamp:
- Jun 22, 2016, 12:21:25 PM (8 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
TimeTracking
v72 v73 3 3 = Time Tracking 4 4 5 Support for basic time tracking is an oft requested feature (#710), but has not been implemented in Trac core. There are ways to enhance the ticket system with the desired functionality and this page is meant as an overview of working solutions and as a howto.6 7 1. wiki:PluginList#ProjectTimeManagementTicketSystemExtensions recommends to use a combination of several plugins, each one covering a partial functionality of what one needs for time tracking.8 9 2. There are also other possibilities by using other plugins. So far, solutions are available and are brieflydescribed below:10 A. through plug-ins ^(1, 2)^:11 * using the [ http://trac-hacks.org/wiki/TracHoursPlugin TracHours plugin] (for Trac >= 0.11)12 * using the [ http://trac-hacks.org/wiki/BudgetingPluginBudgetingPlugin] (for Trac >= 0.12)13 * using [https://tmetric.com TMetric time tracker] (for Trac >= 0.11)14 B. modifying (patching) Trac's source code ^(3)^:5 Support for basic time tracking is an oft requested feature (#710), but is not implemented in Trac core. Time tracking functionality can be added to Trac however, and this page is an overview of working solutions and as a howto. 6 7 1. wiki:PluginList#ProjectTimeManagementTicketSystemExtensions recommends to use a combination of plugins, each covering time tracking functionality. 8 9 2. There are also other possibilities by using other plugins. So far, solutions are available and described below: 10 A. through [https://trac-hacks.org/tags/timing time tracking plugins]: 11 * using the [th:TracHoursPlugin] (for Trac >= 0.11) 12 * using the [th:BudgetingPlugin] (for Trac >= 0.12) 13 * using [https://tmetric.com TMetric time tracker] (for Trac >= 0.11) 14 B. modifying (patching) Trac's source code: 15 15 * using custom ticket fields (for Trac 0.9.x, 0.10) 16 * extending the data model (for Trac 0.8) 17 18 Note ^1^:: For more and up-to-date details visit plug-ins page. 19 Note ^2^:: For an updated and related plug-ins list at Trac-Hacks: [http://trac-hacks.org/tags/%27timingandestimationplugin%27 timingandestimationplugin]. 20 Note ^3^:: Patches are unofficial, please do not report bugs through the Trac ticket system. Instead contact the trac user mailing list or [mailto:steffenp@gmx.de Steffen Pingel]. 16 * extending the data model (for Trac 0.8) 17 18 Note that patches are unofficial, please do not report bugs through the Trac ticket system. Instead contact the [gforum:trac-users trac users mailing list] or [mailto:steffenp@gmx.de Steffen Pingel]. 21 19 22 20 == Using a Plugin (Trac >= 0.10) 23 21 24 The '''[th:TimingAndEstimationPlugin Timing And Estimation Plugin]''' works much the same as the Trac .9.x custom fields approach, except that it should be easier to install and provides a bit more indepth reporting. It also contains a ticket change daemon that allows you to add time and display the total. Also see the [https://trac.acceleration.net/TestForTimingAndEstimation demo version], so you can try and decide if it is right for you, as well as report bugs.22 The '''[th:TimingAndEstimationPlugin Timing And Estimation Plugin]''' works much the same as the Trac 0.9.x custom fields approach, except that it should be easier to install and provides more in-depth reporting. It also contains a ticket change daemon that allows you to add time and display the total. Also see the [https://trac.acceleration.net/TestForTimingAndEstimation demo version], so you can try and decide if it is right for you, as well as report bugs. 25 23 26 24 The '''[th:TracHoursPlugin TracHours plugin]''' provides a different approach to time tracking (for Trac 0.11 only). Instead of adding hours via a ticket field, separate views are available for adding and reporting hours. … … 49 47 Download and apply the [http://steffenpingel.de/files/patches/trac/ time tracking patch]: 50 48 51 * Download and unzip/untar Trac (see TracDownload) 49 * Download and unzip/untar Trac (see TracDownload): 52 50 {{{#!sh 53 51 wget http://ftp.edgewall.com/pub/trac/trac-0.10.tar.gz … … 85 83 ==== Adding the query (optional) 86 84 87 Open your Trac project in a web browser and go to "View Tickets" -> "New Report". You may have to grant the `REPORT_CREATE` permission first. Enter a title like "Time Tracking" and the following query:85 Open your Trac project in a web browser and go to "View Tickets" -> "New Report". You may have to grant the `REPORT_CREATE` permission first. Enter a title like "Time Tracking" and the following query: 88 86 89 87 ===== SQLite … … 110 108 ===== Using PostgreSQL with psycho 111 109 112 PostgreSQL has a few wrinkles and time intervals are not as hard to use:113 114 110 {{{#!sql 115 111 SELECT DISTINCT … … 118 114 s.value::interval AS spent, 119 115 r.value::interval AS interval, 120 ((s.value::interval + r.value::interval) - pl.value::interval) AS accuracy,116 ((s.value::interval + r.value::interval) - pl.value::interval) AS accuracy, 121 117 milestone AS customer, summary, component, status 122 118 FROM enum, ticket t … … 139 135 (CASE WHEN r.value IS NULL THEN '' ELSE r.value END) AS remaining, 140 136 (CASE WHEN ((s.value + r.value) - pl.value) IS NULL THEN '' 141 WHEN ((s.value + r.value) - pl.value) = "0.0" THEN ' ' ELSE (s.value + r.value) - pl.value END) AS accuracy,137 WHEN ((s.value + r.value) - pl.value) = "0.0" THEN ' ' ELSE (s.value + r.value) - pl.value END) AS accuracy, 142 138 milestone AS customer, 143 139 summary, component, status … … 157 153 158 154 * Copy {{{trac-post-commit-hook}}} into /usr/share/trac/contrib. 159 * Create a script {{{hooks/post-commit}}} in your Subversion repository with the content below (modify '''TRAC_ENV''' to point to your local Trac project).155 * Create a script {{{hooks/post-commit}}} in your Subversion repository that modifies '''TRAC_ENV''' to point to your local Trac project. 160 156 * Set the executable bit: {{{chmod 755 hooks/post-commit}}}. 161 157 … … 179 175 ||closes #id||Closes the ticket|| 180 176 181 The time spent and the estimated time remaining are specified in parenthes is. Legalunits are either hours (h) or minutes (m):177 The time spent and the estimated time remaining are specified in parentheses. Valid units are either hours (h) or minutes (m): 182 178 183 179 ||(spent xx h)||Adds xx to time spent and decreases time remaining by xx, {{{spent}}} may be omitted.|| … … 192 188 }}} 193 189 194 This adds an entry to the Changelog of ticket #1, increases the time spent by 4 hours and sets the remaining time to 1 hour .190 This adds an entry to the Changelog of ticket #1, increases the time spent by 4 hours and sets the remaining time to 1 hour: 195 191 196 192 {{{#!sh