Changes between Version 69 and Version 70 of TimeTracking
- Timestamp:
- Apr 13, 2015, 8:23:00 PM (9 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
TimeTracking
v69 v70 1 = Time Tracking = 2 3 [[PageOutline(2-4)]] 4 5 Support for basic time tracking is an oft en request feature, but it does not look like it is going to be integrated into Trac any time soon. Please read #710 for further details. Still there are ways to enhance the ticket system with the desired functionality. This page is meant as an overview of working solutions and as a howto.1 [[PageOutline(2-5,Contents,pullout)]] 2 3 = Time Tracking 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 6 7 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. … … 19 19 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]. 20 20 21 ---- 22 23 == Using a Plugin (Trac >= 0.10) == 24 25 The '''[http://trac-hacks.org/wiki/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 in depth reporting. It also contains a ticket change daemon that will allow you to add time and have it sum the total up. The [http://trac-hacks.org/wiki/TimingAndEstimationPlugin project page] contains links to a [https://trac.acceleration.net/TestForTimingAndEstimation demo version] so you can see it in action to decide if it is right for you , as well as bug reporting links. 26 27 The '''[http://trac-hacks.org/wiki/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. 21 == Using a Plugin (Trac >= 0.10) 22 23 The '''[http://trac-hacks.org/wiki/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 in depth reporting. It also contains a ticket change daemon that will allow you to add time and have it sum the total up. The [http://trac-hacks.org/wiki/TimingAndEstimationPlugin project page] contains links to a [https://trac.acceleration.net/TestForTimingAndEstimation demo version] so you can see it in action to decide if it is right for you, as well as bug reporting links. 24 25 The '''[http://trac-hacks.org/wiki/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. 28 26 29 27 The '''[http://trac-hacks.org/wiki/BudgetingPlugin BudgetingPlugin]''' provides splitting the work-effort for a ticket in several smaller pieces. You can configure tasks (for example implementation, documentation, etc.) and assign users. 30 28 31 The '''[http://trac-hacks.org/wiki/WorkLogPlugin WorkLog Plugin]''' provides the ability to 'clock in' and 'clock out' and displays which users are currently working on tickets. If either the [http://trac-hacks.org/wiki/TimingAndEstimationPlugin TimingAndEstimationPlugin] or [http://trac-hacks.org/wiki/TracHoursPlugin TracHours plugin] is being used, spent time will be recorded to a ticket when the user 'clocks out'. 32 33 ---- 29 The '''[http://trac-hacks.org/wiki/WorkLogPlugin WorkLog Plugin]''' provides the ability to 'clock in' and 'clock out' and displays which users are currently working on tickets. If either the [http://trac-hacks.org/wiki/TimingAndEstimationPlugin TimingAndEstimationPlugin] or [http://trac-hacks.org/wiki/TracHoursPlugin TracHours plugin] is being used, spent time will be recorded to a ticket when the user 'clocks out'. 34 30 35 31 == Trac 0.9.x, 0.10 (using custom ticket fields) == … … 37 33 A less invasive way than modifying the database as required for Trac 0.8 is to add time tracking through TracTicketsCustomFields. Custom fields are meant as an extension mechanism that allows to store additional data with tickets without changing the underlying data model. 38 34 39 === Install ===40 41 This patch requires a few s imple steps for installation:42 43 * Patch Trac to provide a progress bar in the Roadmap view 44 * Modify trac.ini for each project to add custom fields45 * Add a ticket query (optional) 46 * Use a Subversion commit hook to log spent time (optional) 47 48 ==== Patching Trac ====35 === Installation 36 37 This patch requires a few steps for installation: 38 39 * Patch Trac to provide a progress bar in the Roadmap view. 40 * Modify `trac.ini` for each project to add custom fields. 41 * Add a ticket query (optional). 42 * Use a Subversion commit hook to log spent time (optional). 43 44 ==== Patching Trac 49 45 50 46 Download and apply the [http://steffenpingel.de/files/patches/trac/ time tracking patch]: 51 47 52 48 * Download and unzip/untar Trac (see TracDownload) 53 {{{ 49 {{{#!sh 54 50 wget http://ftp.edgewall.com/pub/trac/trac-0.10.tar.gz 55 51 tar -xzvf trac-0.10.tar.gz … … 57 53 58 54 * Run patch from the created trac-0.10 directory: 59 {{{ 55 {{{#!sh 60 56 cd trac-0.10 61 57 wget http://steffenpingel.de/files/patches/trac/trac-time-tracking-0.10.diff … … 64 60 65 61 * (Re)install Trac (see TracInstall): 66 {{{ 62 {{{#!sh 67 63 ./setup.py install 68 64 }}} 69 65 70 ==== Modifying trac.ini ====71 72 Add the following section to your {{{trac.ini}}} in your project's conf directory (see TracIni). This needs to be done for each project that you want to enable time tracking for:73 74 {{{ 66 ==== Modifying trac.ini 67 68 Add the following section to your `trac.ini` in your project's conf directory, see TracIni. This needs to be done for each project that you want to enable time tracking for: 69 70 {{{#!ini 75 71 [ticket-custom] 76 72 tt_estimated = text … … 84 80 }}} 85 81 86 ==== Adding the query (optional) ====87 88 Open your Trac project in a web browser and goto "View Tickets" -> "New Report" (you might need to grant REPORT_CREATE permission first). Enter a title like "Time Tracking" and the following query:89 90 ===== SQLite =====82 ==== Adding the query (optional) 83 84 Open your Trac project in a web browser and goto "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 86 ===== SQLite 91 87 92 88 {{{ … … 110 106 }}} 111 107 112 ===== Using Postgres with psycho =====113 114 Postgres has a few wrinkles and time intervals are not as hard to use .108 ===== Using Postgres with psycho 109 110 Postgres has a few wrinkles and time intervals are not as hard to use: 115 111 116 112 {{{ … … 134 130 }}} 135 131 136 ===== MYSQL =====132 ===== MYSQL 137 133 138 134 {{{ … … 157 153 }}} 158 154 159 ==== Using a Subversion commit hook (optional) ====155 ==== Using a Subversion commit hook (optional) 160 156 161 157 The {{{contrib/trac-post-commit-hook}}} script is a very convenient tool to interact with Trac's ticket system on commit. It allows to modify time tracking values and ticket state through special commit messages. … … 193 189 '''Examples:''' 194 190 195 {{{ 191 {{{#!sh 196 192 svn commit -m 'Added time tracking, refs #1 (spent 4h, rem 1h)' 197 193 }}} … … 199 195 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. 200 196 201 {{{ 197 {{{#!sh 202 198 svn commit -m 'Added time tracking, closes #1 (1h), refs #2 (2h, rem 30m)' 203 199 }}} … … 205 201 This closes ticket #1, increases the time spent by 1 hour and decreases the remaining time by 1 hour. It adds an entry to the Changelog of ticket #2, increases the time spent by 2 hours and sets the remaining time to 30 minutes. 206 202 207 == = Screenshots ===203 == Screenshots 208 204 209 205 Click to enlarge. 210 206 211 === = Roadmap ====207 === Roadmap 212 208 213 209 [[Image(trac-roadmap.png,400,display:block,margin-left:auto,margin-right:auto)]] 214 210 215 === = Milestone ====211 === Milestone 216 212 217 213 [[Image(time-tracking-milestone.png,400,display:block,margin-left:auto,margin-right:auto)]] 218 214 219 === = Ticket Report ====215 === Ticket Report 220 216 221 217 [[Image(trac-timetracking-report.png,400,display:block,margin-left:auto,margin-right:auto)]] 222 218 223 == = Changelog ===219 == Changelog 224 220 225 221 Patches for older version of Trac can be found at http://steffenpingel.de/files/patches/trac/. … … 262 258 * First release for Trac 0.9 stable branch 263 259 264 == = Known Issues ===260 == Known Issues 265 261 266 262 * I couldn't see the second milestone bars so hacked the roadmap.cs to see them ... until I realized that using units (4h instead of just 4 ...) was the problem. All working now, very nice, many thanks. … … 268 264 * If your ticket doesn't have a time planned and/or time remaining set, and you spend time on a ticket, you end up with negative time values, which messes up time planning by having a net time spend of zero. 269 265 270 271 ---- 272 273 == Trac 0.8 (extending the data model) == 266 == Trac 0.8 (extending the data model) 274 267 275 268 This patch is for Trac version 0.8.