Changes between Version 6 and Version 7 of TimeTracking
- Timestamp:
- Nov 1, 2005, 2:06:09 PM (19 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
TimeTracking
v6 v7 5 5 So far two solutions are available that are described below, both modify the Trac's source code: 6 6 7 * Extending the data model (for 0.8 -stable)8 * Using custom ticket fields (for current svn)7 * Extending the data model (for 0.8) 8 * Using custom ticket fields (for 0.9) 9 9 10 10 == Extending the data model == … … 29 29 ===== Patching Trac ===== 30 30 31 Download and apply the latest [http://steffenpingel.de/patches/trac/time tracking patch]:31 Download and apply the [http://steffenpingel.de/patches/trac/trac-time-tracking-0.9.diff time tracking patch]: 32 32 33 * Checkout the latest Trac from the Subversion trunk34 * Run {{{patch -p0 < trac-time-tracking- r1612.diff}}} from the checked out directory33 * Download and unzip/untar Trac 34 * Run {{{patch -p0 < trac-time-tracking-0.9.diff}}} from the checked out directory 35 35 * Reinstall Trac (run {{{./setup.py install}}}) 36 37 Replace {{{r1612}}} with the revision of the patch you downloaded.38 36 39 37 ===== Modifying trac.ini ===== … … 57 55 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: 58 56 57 ====== MySQL ====== 58 59 59 {{{ 60 #!sql 60 61 SELECT DISTINCT 61 62 … … 80 81 81 82 ORDER BY milestone 83 }}} 84 85 ====== Using Postgres with psycho ====== 86 87 Postgres has a few wrinkles and time intervals are not as hard to use. 88 89 {{{ 90 #!sql 91 SELECT DISTINCT 92 id AS ticket, 93 pl.value::interval AS planned, 94 s.value::interval AS spent, 95 r.value::interval AS interval, 96 ((s.value::interval + r.value::interval) - pl.value::interval) as accuracy, 97 milestone AS customer, summary, component, status 98 FROM enum,ticket t 99 LEFT OUTER JOIN ticket_custom pl ON 100 (t.id=pl.ticket AND pl.name='tt_estimated') 101 LEFT OUTER JOIN ticket_custom s ON 102 (t.id=s.ticket AND s.name='tt_spent') 103 LEFT OUTER JOIN ticket_custom r ON 104 (t.id=r.ticket AND r.name='tt_remaining') 105 ORDER BY milestone; 106 82 107 }}} 83 108 … … 121 146 This closes ticket #1, increases the time spent by 1 hour and decreases the remaining time by 1 hour. 122 147 123 124 = Using Postgres with psycho =125 126 Postgres has a few wrinkles and time intervals are not as hard to use.127 {{{128 #!sql129 SELECT DISTINCT130 id AS ticket,131 pl.value::interval AS planned,132 s.value::interval AS spent,133 r.value::interval AS interval,134 ((s.value::interval + r.value::interval) - pl.value::interval) as accuracy,135 milestone AS customer, summary, component, status136 FROM enum,ticket t137 LEFT OUTER JOIN ticket_custom pl ON138 (t.id=pl.ticket AND pl.name='tt_estimated')139 LEFT OUTER JOIN ticket_custom s ON140 (t.id=s.ticket AND s.name='tt_spent')141 LEFT OUTER JOIN ticket_custom r ON142 (t.id=r.ticket AND r.name='tt_remaining')143 ORDER BY milestone;144 145 }}}146 147 148 148