Edgewall Software

Changes between Version 41 and Version 42 of TimeTracking


Ignore:
Timestamp:
Jul 29, 2006, 8:29:33 PM (18 years ago)
Author:
steffenp@…
Comment:

Restructured page

Legend:

Unmodified
Added
Removed
Modified
  • TimeTracking

    v41 v42  
    11= Time Tracking =
    22
     3[[PageOutline(2-4)]]
     4
    35Support 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.
    46
    57So far two solutions are available that are described below, both modify the Trac's source code:
    68
     9 * Using custom ticket fields (for Trac 0.9.x)
    710 * 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
     12The 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].
    1113
    1214----
    1315
    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) ==
    2317
    2418This patch is for Trac version 0.9.x.
    2519
    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:
     20A 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
     24This patch requires a few simple steps for installation:
    2925
    3026 * Patch Trac to provide a progress bar in the Roadmap view
    3127 * 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 ====
    4632
    4733Download and apply the [http://steffenpingel.de/patches/trac/trac-time-tracking-0.9.5.diff time tracking patch]:
     
    5844}}}
    5945
    60 ===== Modifying trac.ini =====
     46==== Modifying trac.ini ====
    6147
    6248Add the following section to your trac.ini (this needs to be used for each project that you want to use with time tracking):
     
    7460}}}
    7561
    76 ===== Adding the query =====
     62==== Adding the query (optional) ====
    7763
    7864Open 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:
    7965
    80 ====== SQLite ======
     66===== SQLite =====
    8167
    8268{{{
     
    10995}}}
    11096
    111 ====== Using Postgres with psycho ======
     97===== Using Postgres with psycho =====
    11298
    11399Postgres has a few wrinkles and time intervals are not as hard to use.
     
    133119}}}
    134120
    135 ===== Using a Subversion commit hook =====
     121==== Using a Subversion commit hook (optional) ====
    136122
    137123The {{{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:
     
    172158This closes ticket #1, increases the time spent by 1 hour and decreases the remaining time by 1 hour.
    173159
    174 
    175 ===== Changelog =====
     160=== Screenshots ===
     161
     162Here 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
     166And of the ticket report:
     167
     168[[Image(trac-timetracking-report-thumb.png, 400px, display:block,margin-left:auto,margin-right:auto)]]
     169
     170=== Changelog ===
    176171
    177172Patches for older version of Trac can be found at http://steffenpingel.de/patches/trac/.
     
    202197 * First release for Trac 0.9 stable branch
    203198
     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
    204203----
    205204
    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
     207This patch is for Trac version 0.8.
     208
     209A 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.