= Estimation and Time Tracking = == Important Links == ''' [https://trac.acceleration.net/TestForTimingAndEstimation/ Demo Site] | [TimeEstimationUserManual User Manual] | [query:status!=closed&component=TimingAndEstimationPlugin&order=priority Open Tickets] | [/newticket?component=TimingAndEstimationPlugin&owner=bobbysmith007 new ticket] ''' [[TOC]] == Description == This is a plugin that adds (aspires to add) estimation and time tracking to Trac. This basically adds !CustomFields and !CustomReports and an interface for filling the dynamic variables for the report. (requires javascript). == Supported Versions == Currently this has been tested on: * Python >=2.5 (perhaps younger pythons will work on earlier trac versions). * Trac >= .10 * '''Because we are using ITicketChangeListener this plugin is only compatible with Trac >= .10''' * if you wish to use Trac < .10, I suggest checking out: http://trac.edgewall.org/wiki/TimeTracking * DB, should support all three major free backends * sqlite3 >= 3.6.8 - Required for SAVEPOINT calls to work * !MySql * PostgreSQL * Genshi * for trac 11 you need a Genshi >= 5 * for trac 12 you need a Genshi >= 6 (Trac installs this automatically) == Getting the Plugin == Download the source using Svn at: * [/svn/timingandestimationplugin/branches/trac0.12 SVN Trac0.12 / Trac 1.0 branch] * [/svn/timingandestimationplugin/branches/trac0.12-Permissions SVN Trac0.12 / Trac 1.0 branch With Permissions] * [/svn/timingandestimationplugin/branches/trac0.11 SVN Trac0.11 branch] * Trac 11 has inconsistent database and transaction management that has been fixed in trac 12 see #8363 * [/svn/timingandestimationplugin/branches/trac0.11-Permissions SVN Trac0.11 branch With Permissions] * [/svn/timingandestimationplugin/branches/trac0.10 SVN Trac0.10 branch] - no longer maintained Download the zipped source : * [download:timingandestimationplugin/branches/trac0.12 Zipped source for plugin for Trac0.12 / Trac 1.0]. * [download:timingandestimationplugin/branches/trac0.12-Permissions Zipped source for plugin for Trac0.12 / Trac 1.0 with permissions]. * [download:timingandestimationplugin/branches/trac0.11 Zipped source for plugin for Trac0.11]. * Trac 11 has inconsistent database and transaction management that has been fixed in trac 12 see #8363 * [download:timingandestimationplugin/branches/trac0.11-Permissions Zipped source for plugin for Trac0.11 with permissions]. * [download:timingandestimationplugin/branches/trac0.10 Zipped source for plugin for Trac0.10]. - no longer maintained {{{ When downloading these files the extention is lost, or the filename corrupted. a simple rename to filename.zip seems to resolve it the contents are intact }}} Browse the source using Trac: * [source:timingandestimationplugin/branches/trac0.12 Version of this plugin for Trac0.12 / Trac 1.0]. * [source:timingandestimationplugin/branches/trac0.12-Permissions Version of this plugin for Trac0.12-Permissions / Trac 1.0]. * [source:timingandestimationplugin/branches/trac0.11 Version of this plugin for Trac0.11]. * [source:timingandestimationplugin/branches/trac0.11-Permissions Version of this plugin for Trac0.11-Permissions]. * [source:timingandestimationplugin/branches/trac0.10 Version of this plugin for Trac0.10]. - no longer maintained In the repository there is a script folder [browser:timingandestimationplugin/branches/trac0.12/scripts 0.12]/[browser:timingandestimationplugin/branches/trac0.11/scripts 0.11] that contains some various python files that I have written to perform billing queries across an entire directory of tracs and email the results to a specified address. As is these are written to work in my setup and some paths at the top of each file will probably need to be changed. These are mostly included because I wrote them for myself and thought others might want to perform similar tasks. (See: [wiki:TimingAndEstimationScriptHelp script help]) == Documents == * [TimeEstimationAndQuotingSpecification Initial Plugin Specification] * [TimeEstimationUserManual User Manual] * See [TimingAndEstimationPlugin#PostInstallationConfigurationOptions Post Installation Configuration Options] for information about this plugin's SVN Post Commit Hook * t:TimeTracking == Installation Help == 1. Install the plugin (either for a single project, or globally). See the details on how to install a trac plugin at: [trac:TracPlugins] * '''No Really, GO READ [trac:TracPlugins]''' 1. Be sure that the plugin is enabled. Add "timingandestimationplugin.* = enabled" to trac.ini (in the [components] subheading). * Alternatively, this can be enabled in the Web Admin section of the website as well 1. Run `$ trac-admin /path/to/projenv upgrade` * You should get a message like this: {{{ Timing and Estimation needs an upgrade Upgrading Database Creating bill_date table Upgrading fields Upgrading reports Upgrading usermanual Done Upgrading Upgrade done. }}} 1. Reload/restart your HTTPD / other webserver / Tracd. That's it. == Post Installation Configuration Options == === Components === By default, the TimingAndEstimationPlugin's four components will all be active. However, you can disable some of the components if you want to. (The easiest way to do this is to ensure you have the trac:WebAdmin plugin installed.) The plugin's components are: 1. !TimeTrackingSetupParticipant[[BR]] Required component. 1. !TimeTrackingTicketObserver[[BR]] Ensures that the "Total Hours" values are updated when a user edits a ticket's "Add Hours to Ticket" field. You would not normally want to disable this component. 1. !TicketWebUiAddon 1. !TimingEstimationAndBillingPage === Permissions (Trac>=11 only) === * [wiki:TimeEstimationUserManual#Configuration] has section about configuring permission if you are using the permission enabled branch === Post Commit Hooks === The [browser:timingandestimationplugin/branches/trac0.12/scripts/ scripts folder] contains various post-commit scripts. The svn and git post receive/commit hooks call the [browser:timingandestimationplugin/branches/trac0.12/scripts/trac-post-commit.py trac-post-commit.py] script with the correct command line arguments (see #8737 for more information and an alternative single file git-post-receive). There are a simple [browser:timingandestimationplugin/branches/trac0.12/scripts/svn-post-commit.sh svn-post-commit.sh], a simple [browser:timingandestimationplugin/branches/trac0.12/scripts/git-post-receive git-post-receive], and a more complex [browser:timingandestimationplugin/branches/trac0.12/scripts/git_post_receive.py git_post_receive.py] that tries to ensure that each commit is sent to trac only once (by default moving a commit from one branch to another will cause the comment (and time) to be reposted to trac again(resulting in unintentional extra time on tickets). * [wiki:TimingAndEstimationSVNPostCommitHook SVN Post-Commit-Hook] Clock time and make comments from your svn commit message * ''' [browser:timingandestimationplugin/branches/trac0.12/scripts/trac-post-commit.py This plugin's version of the post-commit-hook for trac 12] ''' * ''' [browser:timingandestimationplugin/branches/trac0.11/scripts/trac-post-commit.py This plugin's version of the post-commit-hook for trac 11] ''' * ''' [browser:timingandestimationplugin/branches/trac0.10/scripts/trac-post-commit.py This plugin's version of the post-commit-hook for trac 10] ''' == Bugs/Feature Requests == Existing bugs and feature requests for TimingAndEstimationPlugin are [query:status!=closed&component=TimingAndEstimationPlugin&order=priority here]. If you have any issues, create a [/newticket?component=TimingAndEstimationPlugin&owner=bobbysmith007 new ticket]. == Uninstall Help == * There is an [browser:timingandestimationplugin/branches/trac0.12/scripts/uninstall.py uninstall script] in the [browser:timingandestimationplugin/branches/trac0.12/scripts/ scripts] folder that tries to make uninstall easy. I dont promise it will get everything, but it should get you most of the way there. * see #995 - old uninstall ticket, which might provide some insight. == Patches == * #3081 - [http://trac-hacks.org/attachment/ticket/3081/reports.patch Extra remaining hours after the ticket is closed inconsistency] * #5195 - [http://trac-hacks.org/attachment/ticket/5195/timingandestimation.patch Patch to allow development time and time spend writing automated tests to be tracked separately on the same ticket] * #7142 - [http://trac-hacks.org/attachment/ticket/7142/timingandestimation.diff Patch to allow internal checkbox to be easily removed] * #7688 - [http://www.eclipse.org/forums/index.php?t=msg&S=f840058166cbbdd857c10831379f450a&th=21872 Patch (for Mylyn) integrating TimingAndEstimationPlugin with Eclipse Mylyn ] == Related Plugins == * The TracHoursPlugin is a different plugin trying to accomplish the same thing as TimingAndEstimationPlugin, but in a different way. * EstimationToolsPlugin - makes pretty pictures based on estimated hours field (which this plugin can provide) * The ScrumBurndownPlugin makes use of this plugin to provide a javascripted daily burndown chart, useful in the agile development methodology known as Scrum. * RoadmapHoursPlugin - Makes the roadmap / Milstone views be based on the hours provided by TimingAndEstimationPlugin * ScrumPlugin - a Radical reworking of the ScrumBurndownPlugin and TimingAndEstimationPlugin. * WorkLogPlugin gives an interface that allows you to record time in a work log type format (start and stop tasks) * TracSlimTimerPlugin - Trac and [http://slimtimer.com/ SlimTimer] integration * TimeVisualizerPlugin the same as ScrumBurndownPlugin except is much more flexible and doesn't change db in any way (just reads history data provided by TimingAndEstimationPlugin & Trac itself). For details see [browser:timevisualizerplugin/branches/TimeVisualizer_0.4/doc/InitialDesignGoals InitialDesignGoals]. * TaskjugglerPlugin - Export data from Trac to Taskjuggler - uses the same custom fields as TandE === Interacting with T&E === If you want a plugin that you are writing to add reports to the management page, there is a file, [browser:timingandestimationplugin/branches/trac0.10/timingandestimationplugin/reportmanager.py reportmanager.py], that should make interacting with its reports easier. == Recent Changes == ,, '''[TimingAndEstimationFullChangeLog Full Change Log]''' [[ChangeLog(timingandestimationplugin, 4)]] ,, == Author/Contributors == '''Author:''' [wiki:bobbysmith007] [[BR]] '''Contributors:''' * [http://www.aquafold.com/ Aquafold] has provided a license to their excellent Aqua Data Studio application to help further development {{{ #!html
}}} * [http://www.obsidiansoft.com/ Obsidian Software] sponsored the work to create a permission enabled branch {{{ #!html
}}} * Alessio Massaro: wiki:masariello * Helped Get Reports working in postgres and started moving toward generic work rather than hours * kkurzweil@lulu.com * helped postegresql db backend compatiblity * Jonas Borgstrom : t:wiki:JonasBorgstrom * made it so that base_url was unnecessary * [wiki:coling Colin Guthrie] * Refactored custom reports stuff into a single class/module that can be copied to other plugins, to make interaction with T&E easier. * David Abrahams * Trac.11 - Stream filters to prettify the Reports Screen and make !TotalHours not editable * Tay Ray Chuan * Added a stopwatch to the ticket pages * Josh Godsiff, for [http://oxideinteractive.com.au Oxide Interactive] * added props table client reformatting to remove extra whitespace