Changes between Version 41 and Version 42 of TimeTracking
- Timestamp:
- Jul 29, 2006, 8:29:33 PM (18 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
TimeTracking
v41 v42 1 1 = Time Tracking = 2 2 3 [[PageOutline(2-4)]] 4 3 5 Support for basic time tracking is an often 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. 4 6 5 7 So far two solutions are available that are described below, both modify the Trac's source code: 6 8 9 * Using custom ticket fields (for Trac 0.9.x) 7 10 * Extending the data model (for Trac 0.8) 8 * Using custom ticket fields (for Trac 0.9.x) 9 10 This patch is 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]. 11 12 The 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]. 11 13 12 14 ---- 13 15 14 == Extending the data model == 15 16 This patch is for Trac version 0.8. 17 18 A patch has been posted to #1005 that adds two new fields to the ticket table, "Planned work" and "Actual work", that can be edited in the ticket view. It also extends the Roadmap with a progress bar that displays how much work has been done and how much remains. 19 20 ---- 21 22 == Using custom ticket fields == 16 == Trac 0.9.x (using custom ticket fields) == 23 17 24 18 This patch is for Trac version 0.9.x. 25 19 26 A less invasive way to add time tracking is through TracTicketsCustomFields. Custom fields are meant as an extension mechanism that allows to store additional data with tickets without changing the underlying data model. 27 28 This patch touches quite a few spots though: 20 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. 21 22 === Install === 23 24 This patch requires a few simple steps for installation: 29 25 30 26 * Patch Trac to provide a progress bar in the Roadmap view 31 27 * Modify trac.ini for each project to add custom fields 32 * Add a ticket query 33 * Use a Subversion commit hook to log spent time 34 35 ===== Screenshots ===== 36 37 Here is a screen shot of the roadmap (click to enlarge): 38 39 [[Image(trac-roadmap-thumb.png, 400px, display:block,margin-left:auto,margin-right:auto)]] 40 41 And of the ticket report: 42 43 [[Image(trac-timetracking-report-thumb.png, 400px, display:block,margin-left:auto,margin-right:auto)]] 44 45 ===== Patching Trac ===== 28 * Add a ticket query (optional) 29 * Use a Subversion commit hook to log spent time (optional) 30 31 ==== Patching Trac ==== 46 32 47 33 Download and apply the [http://steffenpingel.de/patches/trac/trac-time-tracking-0.9.5.diff time tracking patch]: … … 58 44 }}} 59 45 60 ==== = Modifying trac.ini =====46 ==== Modifying trac.ini ==== 61 47 62 48 Add the following section to your trac.ini (this needs to be used for each project that you want to use with time tracking): … … 74 60 }}} 75 61 76 ==== = Adding the query =====62 ==== Adding the query (optional) ==== 77 63 78 64 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: 79 65 80 ===== = SQLite ======66 ===== SQLite ===== 81 67 82 68 {{{ … … 109 95 }}} 110 96 111 ===== = Using Postgres with psycho ======97 ===== Using Postgres with psycho ===== 112 98 113 99 Postgres has a few wrinkles and time intervals are not as hard to use. … … 133 119 }}} 134 120 135 ==== = Using a Subversion commit hook =====121 ==== Using a Subversion commit hook (optional) ==== 136 122 137 123 The {{{contrib/trac-post-commit-hook}}} script is a very convenient tool to interact with Trac's ticket system on commit. Copy the script that gets created by the .diff above into /usr/share/trac/contrib and create a script '''hooks/post-commit''' in your Subversion repository (do not forget to set the executable bit {{{chmod 755 hooks/post-commit}}} with the following content, modify the TRAC_ENV to point to your local Trac project: … … 172 158 This closes ticket #1, increases the time spent by 1 hour and decreases the remaining time by 1 hour. 173 159 174 175 ===== Changelog ===== 160 === Screenshots === 161 162 Here is a screen shot of the roadmap (click to enlarge): 163 164 [[Image(trac-roadmap-thumb.png, 400px, display:block,margin-left:auto,margin-right:auto)]] 165 166 And of the ticket report: 167 168 [[Image(trac-timetracking-report-thumb.png, 400px, display:block,margin-left:auto,margin-right:auto)]] 169 170 === Changelog === 176 171 177 172 Patches for older version of Trac can be found at http://steffenpingel.de/patches/trac/. … … 202 197 * First release for Trac 0.9 stable branch 203 198 199 === Known Issues === 200 201 * 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. 202 204 203 ---- 205 204 206 == Issues == 207 208 * 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. 209 210 211 ---- 212 205 == Trac 0.8 (extending the data model) == 206 207 This patch is for Trac version 0.8. 208 209 A patch has been posted to #1005 that adds two new fields to the ticket table, "Planned work" and "Actual work", that can be edited in the ticket view. It also extends the Roadmap with a progress bar that displays how much work has been done and how much remains.