Search code examples
svnproject-managementtrac

How can I best take advantage of Trac?


I have a Trac project installed on top of a Subversion implementation (easy to do thanks to Webfaction's control panel), but now I have configuration work to do. With that in mind, are there easy ways to do the following in Trac:

1) Ensure that customers can only see a high level progress indicator.
2) Give daily summary reports on tickets, testing, and tasks.

Also, I am interested in knowing if there are any highly recommended plugins that I would be sorry I forgot to install.


Solution

  • 1) high level progress indicator:

    The roadmap tab gives you kind of a high level progress indicator. It lists all milestones, and for each milestone it shows you:

    • milestone title
    • short description
    • date on which the milestone is due
    • how much time is left until then (or how long you are behind you schedule)
    • how many tickets are assigned to that milestone and how many of them have been closed, visualized as a nice green progress bar. This bar is drawn on the assumtion that each ticket has the same weight, which might be misleading

    You can restrict your permissions in a way that your customer can only access this view.

    Depending on the relationship between you and your customer, you might want to give him the ability to create new tickets (permission TICKET_CREATE), which should be possible without giving him read access to other tickets (TICKET_VIEW and TICKET_MODIFY). Sorry, but I can't currently test if this really works, maybe someone can comment on this.

    2) daily summary reports

    trac offers you RSS feeds for everything you can think of. It should be possible to generate daily reports from this, or you simply tell your RSS client to check the feed once a day.

    Trac also has the abilty to inform a ticket-owner via mail if that ticket changed, but it will happen instantly, not as a daily summary. You can comment on tickets, and sometimes we use them like a discussion board or mailing list, and in this case it's good to be notified instantly.

    Other configuration

    In each project I do with trac, I create a custom query to list all tickets that nobody owns:

    SELECT p.value AS __color__,
       owner AS __group__,
    status,
       id AS ticket, summary, component, milestone, t.type AS type, time AS created,
       changetime AS _changetime, description AS _description,
       reporter AS _reporter
      FROM ticket t
      LEFT JOIN enum p ON p.name = t.priority AND p.type = 'priority'
      WHERE status = 'new' AND (owner = '' OR owner = 'somebody'  OR owner = 'None' )
      ORDER BY owner, p.value, t.type, time
    

    Each ticket may have an owner and several people in the cc field, but the report for my tickets only lists those where you are the owner. To overcome this, I add a query like this:

      SELECT p.value AS __color__,
       (CASE owner WHEN '$USER' THEN 
         (CASE status 
           WHEN 'assigned' 
           THEN 'Tickets that you accepted' 
           ELSE 'Tickets that were assigned to you, please accept or reassign' 
          END) 
         ELSE 'Tickets, that have your name in the cc' END) 
         AS __group__,
       id AS ticket, summary, component, version, milestone,
       t.type AS type, priority, time AS created,
       changetime AS _changetime, description AS _description,
       reporter AS _reporter
      FROM ticket t
      LEFT JOIN enum p ON p.name = t.priority AND p.type = 'priority'
      WHERE t.status  'closed' AND (owner = '$USER' OR cc like '%$USER%')
      ORDER BY owner, (status = 'assigned') DESC, p.value, milestone, t.type, time
    

    (this code works in trac 0.11b)

    That's my favorite ticket report. It goups tickets by three classes:

    • Tickets you own and accepted
    • Tickets that were assigned to you, but you didn't accept yet
    • Tickets that have you in the cc (that the fancy thing you don't get without that query)

    The queries might look scary, but they are simple modifications of the queries that are already there. You don't have to hack the trac source code, the webinterface lets you edit queries.

    Plugins

    I recommend the XML RPC plugin if you work with eclipse. It enables tight integration with Mylin. (I think basic integration works even without the plugin), so your developers can do many tasks from within eclipse without switching to the trac webinterface.

    (If you use eclipse, but don't know mylin, you should have a look at it. You can test it without any configuration because it comes with most eclipse distributions and can work as standalone without trac.)