Changes between Version 70 and Version 71 of TimeTracking
- Timestamp:
- Nov 17, 2015, 10:45:18 AM (8 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
TimeTracking
v70 v71 21 21 == Using a Plugin (Trac >= 0.10) 22 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. 26 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. 28 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'. 30 31 == Trac 0.9.x, 0.10 (using custom ticket fields) == 23 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 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. 24 25 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. 26 27 The '''[th: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. 28 29 The '''[th: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'. 30 31 The '''[th:EstimatorPlugin]''' allows you to enter upfront estimations as to how long the completion of a ticket is going to take. 32 33 == Trac 0.9.x, 0.10 (using custom ticket fields) 32 34 33 35 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. … … 66 68 ==== Modifying trac.ini 67 69 68 Add the following section to your `trac.ini` in your project's confdirectory, see TracIni. This needs to be done for each project that you want to enable time tracking for:70 Add the following section to your `trac.ini` file in your project's configuration directory, see TracIni. This needs to be done for each project that you want to enable time tracking for: 69 71 70 72 {{{#!ini … … 86 88 ===== SQLite 87 89 88 {{{ 89 #!sql 90 {{{#!sql 90 91 SELECT DISTINCT 91 92 id AS ticket, … … 93 94 (CASE WHEN s.value ISNULL THEN '' ELSE s.value END) AS spent, 94 95 (CASE WHEN r.value ISNULL THEN '' ELSE r.value END) AS remaining, 95 (CASE WHEN ((s.value + r.value) - pl.value) = "0.0" THEN ' ' ELSE (s.value + r.value) - pl.value END) asaccuracy,96 (CASE WHEN ((s.value + r.value) - pl.value) = "0.0" THEN ' ' ELSE (s.value + r.value) - pl.value END) AS accuracy, 96 97 milestone AS customer, 97 98 summary, component, status 98 FROM ticket t, enum p99 FROM ticket t, enum p 99 100 LEFT OUTER JOIN ticket_custom pl ON 100 (t.id =pl.ticket AND pl.name='tt_estimated')101 (t.id = pl.ticket AND pl.name = 'tt_estimated') 101 102 LEFT OUTER JOIN ticket_custom s ON 102 (t.id =s.ticket AND s.name='tt_spent')103 (t.id = s.ticket AND s.name = 'tt_spent') 103 104 LEFT OUTER JOIN ticket_custom r ON 104 (t.id =r.ticket AND r.name='tt_remaining')105 (t.id = r.ticket AND r.name = 'tt_remaining') 105 106 ORDER BY milestone 106 107 }}} 107 108 108 ===== Using Postgres with psycho 109 110 Postgres has a few wrinkles and time intervals are not as hard to use: 111 112 {{{ 113 #!sql 109 ===== Using PostgreSQL with psycho 110 111 PostgreSQL has a few wrinkles and time intervals are not as hard to use: 112 113 {{{#!sql 114 114 SELECT DISTINCT 115 115 id AS ticket, 116 pl.value::interval 116 pl.value::interval AS planned, 117 117 s.value::interval AS spent, 118 118 r.value::interval AS interval, 119 ((s.value::interval + r.value::interval) - pl.value::interval) asaccuracy,120 milestone AS customer, 121 FROM enum, ticket t119 ((s.value::interval + r.value::interval) - pl.value::interval) AS accuracy, 120 milestone AS customer, summary, component, status 121 FROM enum, ticket t 122 122 LEFT OUTER JOIN ticket_custom pl ON 123 (t.id =pl.ticket AND pl.name='tt_estimated')123 (t.id = pl.ticket AND pl.name = 'tt_estimated') 124 124 LEFT OUTER JOIN ticket_custom s ON 125 (t.id =s.ticket AND s.name='tt_spent')125 (t.id = s.ticket AND s.name = 'tt_spent') 126 126 LEFT OUTER JOIN ticket_custom r ON 127 (t.id =r.ticket AND r.name='tt_remaining')127 (t.id = r.ticket AND r.name = 'tt_remaining') 128 128 ORDER BY milestone; 129 130 129 }}} 131 130 132 131 ===== MYSQL 133 132 134 {{{ 135 #!sql 133 {{{#!sql 136 134 SELECT DISTINCT 137 135 id AS ticket, … … 140 138 (CASE WHEN r.value IS NULL THEN '' ELSE r.value END) AS remaining, 141 139 (CASE WHEN ((s.value + r.value) - pl.value) IS NULL THEN '' 142 WHEN((s.value + r.value) - pl.value) = "0.0" THEN ' ' ELSE (s.value + r.value) - pl.value END) asaccuracy,140 WHEN((s.value + r.value) - pl.value) = "0.0" THEN ' ' ELSE (s.value + r.value) - pl.value END) AS accuracy, 143 141 milestone AS customer, 144 142 summary, component, status 145 FROM enum p, ticket t143 FROM enum p, ticket t 146 144 LEFT OUTER JOIN ticket_custom pl ON 147 (t.id =pl.ticket AND pl.name='tt_estimated')145 (t.id = pl.ticket AND pl.name = 'tt_estimated') 148 146 LEFT OUTER JOIN ticket_custom s ON 149 (t.id =s.ticket AND s.name='tt_spent')147 (t.id = s.ticket AND s.name = 'tt_spent') 150 148 LEFT OUTER JOIN ticket_custom r ON 151 (t.id =r.ticket AND r.name='tt_remaining')149 (t.id = r.ticket AND r.name = 'tt_remaining') 152 150 ORDER BY milestone 153 151 }}}