[[PageOutline(2-5,Contents,pullout)]] {{{#!NewsFlash '''Known (Confirmed) Issues''' * Incompatible with iCalExporterPlugin (#4368) * Filters cannot be removed from the Hours page in Trac 0.12 (#7642) '''Priority Enhancements''' * Hours entry will be inline with the ticket template rather than in the sidebar (#8264) * Organizing and improving the queries / reports and improving template layouts (#8280, #8281) }}} = Track hours spent on tickets == Description The goal of this plugin is to help keep track of hours worked on tickets. TracHoursPlugin is an alternative to TimingAndEstimationPlugin, but with a different approach: * Instead of adding hours only via ticket fields, there is a separate view for managing ticket hours. `/hours/` displays the accrued hours for a particular ticket with a timeline-like view, but should also allow adding of new hours (by default, on "today", but this should be changeable via dropdown menus for day, month, year, etc), editing previously entered hours (amount, date, description) and deleting previously alloted hours if you have the appropriate permissions (`TICKET_ADD_HOURS` for your own hours, `TRAC_ADMIN` for the hours of others). * A management and query view is at `/hours`. This view displays the hours for all tickets for a given time period (last week, by default) in a way that combines the query interface for querying tickets and the timeline display for hours on the tickets in the time period. Query filters are available to find hours for people, hours for tickets of a certain component, etc. * Hours are uniquely assigned to tickets and people. * Hours may have a description, which should be displayed in the applicable views; if a description is provided, the hours and description are logged to ticket comments. * Tickets have links to `/hours/` as the total hours field so that a user can add and view hours for the ticket. Hour tracking and estimation is most useful for the following types of questions: * How much time has been spent on a project? * How much time remains in a budget (estimate for a project)? * How much time have we committed to for the next time period ? * How much time is a developer committed to over the next time period? If we put hour estimates on tickets, assign tickets to people, associate tickets with milestones, and give milestones due dates, !TracHours can generate reports to answer those questions. For other Trac time-tracking solutions, see t:TimeTracking. == Components !TracHours consists of a number of components that work together to help track time: === TracHoursPlugin `TracHoursPlugin` is the core component of !TracHours. * API function. * Navigation bar provider. * Query view for `/hours`. * Ticket hours view for `/hours/` * Stream filter for checking and rendering of estimated hours and total hours fields for tickets * RSS feeds at `/hours?format=rss` and `/hours/?format=rss` This component must be enabled to use the TracHoursPlugin functionality. === SetupTracHours `SetupTracHours` sets up the database and custom fields for the TracHoursPlugin. You must enable this component for anything to work, including the `TracHoursPlugin` component. === TracHoursRoadmapFilter `TracHoursRoadmapFilter` adds hours information for milestones at `/roadmap` and `/milestone/` === TracHoursSidebarProvider The `TracHoursSidebarProvider` component uses the TicketSidebarProviderPlugin (if enabled) to add a form to each ticket for direct addition of hours to the ticket. Hours will be logged as the authenticated user and comments will not be made. [[Image(hours-ticket-sidebar.png, border=1)]] === TracHoursByComment The `TracHoursByComment` component enables adding hours by ticket comments. Comments containing snippets like `5 hours`, `1 hour`, `3.7 hours`, or `0:30 hours` will be added to the total hours for the ticket, provided the commenter has the `TICKET_ADD_HOURS` permission. === MultiprojectHours The TracHoursPlugin exports RSS from the `/hours` handler. This has been utilized to provide hours reports across projects sharing the same parent directory. If `trachours.multiproject` is enabled, then `/hours/multiproject` will become a handler front-ending hours reports throughout the project and a link to this will appear on the `/hours` page to `/hours/multiproject`. The multiproject report breaks down hours by project and worker giving row and column totals. If there are no hours for a project, then that project will not be shown. [[Image(multiprojecthours.png, border=1)]] == How to Use !TracHours The TracHoursHowto offers a guide to the features of the TracHoursPlugin and how to use them. == Bugs/Feature Requests Existing bugs and feature requests for TracHoursPlugin are [query:status!=closed&component=TracHoursPlugin&order=priority here]. If you have any issues, create a [/newticket?component=TracHoursPlugin&owner=rjollos new ticket]. [[TicketQuery(component=TracHoursPlugin&group=type,format=progress)]] == Installation TracHoursPlugin requires the following components: * ComponentDependencyPlugin * TicketSidebarProviderPlugin * TracSqlHelperScript See [http://trac.edgewall.org/wiki/TracPlugins#InstallingaTracPlugin InstallingaTracPlugin] for more information on installing plugins. Additionally, you will require on your server: * !DateUtil, available [pypi:python-dateutil/1.4.1 here] or package ''python-dateutil'' on Debian based systems. * !FeedParser, available [http://code.google.com/p/feedparser/downloads/list here] or package ''python-feedparser'' on Debian based systems. Now, TracHoursPlugin is enabled like any other Trac plugin: Download the [download:trachoursplugin zipped source], check out [/svn/trachoursplugin using Subversion], or [source:trachoursplugin browse the source] with Trac. * Download and install the plugin. * Enable the plugin. Use either the webadmin interface or add the following lines to the `trac.ini` file: {{{#!ini [components] trachours.* = enabled }}} * You will need to upgrade {{{trac-admin upgrade}}} to create the correct database tables. * Give users the permission `TICKET_ADD_HOURS`. '''Note:''' The TracHoursPlugin requires Python at least 2.4. == Recent Changes [[ChangeLog(trachoursplugin, 3)]] == Author/Contributors ''Original developed at [http://www.openplans.org The Open Planning Project]'' '''Authors:''' [http://www.openplans.org/people/novalis novalis], [wiki:k0s] [[BR]] '''Maintainer:''' [[Maintainer]] [[BR]] '''Contributors:'''