Changes between Version 44 and Version 45 of TimeTracking
- Timestamp:
- Jul 29, 2006, 10:10:38 PM (18 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
TimeTracking
v44 v45 33 33 Download and apply the [http://steffenpingel.de/patches/trac/trac-time-tracking-0.9.5.diff time tracking patch]: 34 34 35 * Download and unzip/untar Trac 35 * Download and unzip/untar Trac (see TracDownload) 36 {{{ 37 wget http://ftp.edgewall.com/pub/trac/trac-0.9.6.tar.gz 38 tar -xzvf trac-0.9.6.tar.gz 39 }}} 40 36 41 * Run patch from the created trac-0.9 directory: 37 42 {{{ 38 patch -p0 < trac-time-tracking-0.9.5.diff 43 cd trac-0.9.6 44 wget http://steffenpingel.de/patches/trac/trac-time-tracking-0.9.6.diff 45 patch -p0 < trac-time-tracking-0.9.6.diff 39 46 }}} 40 47 41 * Reinstall Trac:48 * (Re)install Trac (see TracInstall): 42 49 {{{ 43 50 ./setup.py install … … 46 53 ==== Modifying trac.ini ==== 47 54 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):55 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: 49 56 50 57 {{{ … … 69 76 #!sql 70 77 SELECT DISTINCT 71 72 78 id AS ticket, 73 79 (CASE WHEN pl.value ISNULL THEN '' ELSE pl.value END) AS planned, … … 77 83 milestone AS customer, 78 84 summary, component, status 79 80 81 82 85 FROM ticket t,enum p 83 84 86 LEFT OUTER JOIN ticket_custom pl ON 85 87 (t.id=pl.ticket AND pl.name='tt_estimated') 86 87 88 LEFT OUTER JOIN ticket_custom s ON 88 89 (t.id=s.ticket AND s.name='tt_spent') 89 90 90 LEFT OUTER JOIN ticket_custom r ON 91 91 (t.id=r.ticket AND r.name='tt_remaining') 92 93 94 92 ORDER BY milestone 95 93 }}} … … 121 119 ==== Using a Subversion commit hook (optional) ==== 122 120 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: 121 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. 122 123 * Copy {{{trac-post-commit-hook}}} into /usr/share/trac/contrib. 124 * Create a script {{{hooks/post-commit}}} in your Subversion repository with the content below (modify '''TRAC_ENV''' to point to your local Trac project). 125 * Set the executable bit: {{{chmod 755 hooks/post-commit}}}. 124 126 125 127 {{{ … … 141 143 ||refs #id||Adds a reference to the ticket's Changelog|| 142 144 ||closes #id||Closes the ticket|| 143 ||spent xxh||Adds the amount to the time spent, decreases the time remaining by amount|| 144 ||rem xxh||Sets the time remaining to the amount.|| 145 146 The time spent and the estimated time remaining are specified in parenthesis. Legal units are either hours (h) or minutes (min): 147 148 ||(spent xx h)||Adds xx to time spent and decreases time remaining by xx, {{{spent}}} may be omitted.|| 149 ||(spent xx h, rem yy h)||Adds xx to time spent and sets time remaining to yy.|| 150 151 See {{{contrib/trac-post-commit-hook}}} for details (after applying the patch). 145 152 146 153 '''Examples:''' 147 154 148 155 {{{ 149 svn commit -m 'Added time tracking, refs #1 , spent 4h, rem 1h'156 svn commit -m 'Added time tracking, refs #1 (spent 4h, rem 1h)' 150 157 }}} 151 158 … … 153 160 154 161 {{{ 155 svn commit -m 'Added time tracking, closes #1 , spent 1h'156 }}} 157 158 This closes ticket #1, increases the time spent by 1 hour and decreases the remaining time by 1 hour. 162 svn commit -m 'Added time tracking, closes #1 (1h), refs #2 (2h, rem 30m)' 163 }}} 164 165 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. 159 166 160 167 === Screenshots === … … 177 184 178 185 Patches for older version of Trac can be found at http://steffenpingel.de/patches/trac/. 186 187 ''[http://steffenpingel.de/patches/trac/trac-time-tracking-0.9.6.diff 0.9.6]'' (2006-07-29) 188 189 * The patch has been adapted for Trac 0.9.6 190 * Significant enhancements to the milestone page and the post-commit-hook (please see [TimeTracking#UsingaSubversioncommithookoptional the documentation] for the new syntax) have been contributed by Magnus Sandberg: 191 * The milestone page now show time tracking progress bars for "Ticket status by x" 192 * The commit hook can now handle different spent/remaining values for multiple tickets 193 * Tooltips have been added to the time tracking progress bars 179 194 180 195 ''[http://steffenpingel.de/patches/trac/trac-time-tracking-0.9.5.diff 0.9.5]'' (2006-05-16)