Integrate with Trac

You are viewing an old version (v. 18) of this page.
The latest version is v. 30, last edited on Aug 28, 2010 (view differences | )
<< View previous version | view page history | view next version >>

QuickBuild now integrate with Trac natively. The integration features:

  • Hyperlink the Trac ticket id in commit messages to corresponding JIRA pages
  • Generate an issues report from commit messages
  • Progress/update the issues from commit messages
  • Release a milestone of a project in Trac
  • Create an issue to Trac based on a customized step condition

This page will describe how to integrate Trac in QuickBuild.

On This Page

Supported Trac version: 0.11 or higher.

Basic Integration

To enable the integration:

  1. Install and enable XML RPC plugin for Trac. This plugin and its installation guide can be found at below link:
    http://trac-hacks.org/wiki/XmlRpcPlugin
  2. Configure Trac Server on configuration settings tab.

    Below lists the descriptions of these properties:
    Property Description
    Server URL Defines the server url. you can test it by adding "/rpc", for example, if the server url is: http://localhost/trac/project, open below url in your browser: http://localhost/trac/project/rpc, and if the "Remote Procedure Call (RPC)" page can be displayed correctly, the url is correct.
    User Name The user should have TICKET_VIEW permission. If you want to update issues from QuickBuild, the user should also have TICKET_MODIFY permission.
    Ticket Pattern Defines the ticket pattern which will be used to extract the ticket id from commit messages. The ticket pattern here uses Java regular expression to match the ticket ids. By default, below pattern will match #123 or ticket:123.
        (?<!\:)(?:#|ticket:)\d+
      

After doing these, the issues keys mentioned in commit messages will be hyperlinked:

and a ticket report will be displayed in Build tab:

you can also find all related issues from a specified version and view the changes for an issue:

After configured the Trac server in the configuration settings, below steps are available to add in your build workflow:

  • Update Issue Step
  • Release Version Step
  • Create Issue Step

Advanced Integration

Besides the basic integration, QuickBuild also features:

  • Update tickets mentioned in commit messages directly
  • Cooperate with Trac to manage both Trac and QuickBuild version
  • Release a Trac milestone and also update the milestone field of tickets mentioned in commit messages which can help you to generate the Release Notes easily.

Update Tickets

To update tickets from the commit messages, Update Trac Ticket step should be added to your build workflow. And when QuickBuild find any commit command in the commit message, QuickBuild will execute it to update or progress the ticket.

NOTE:

  • To update tickets, the user defined in Trac setting should has the TICKET_ADMIN permission.
  • This step should be defined after your checkout step.
  • QuickBuild will update all tickets which are requested from the commit comments from previous successful build.
  • If a ticket updated manually after committed, this tickets will not be updated then.
Customize Commit Command

The commit command can be customized in the step:

The commit command property defines the commit command which you can change to meet your company requirements. And the update attributes here are what you want to change in your Trac when executing the commit command. For example, when executing accept commit command above, QuickBuild will update the ticket status and change it to accept, also will update the owner to the command committer which is same as the SCM committer.

Below section will discuss the attributes available.

Command Attributes

The command attributes for Trac are defined by the Trac server. You may ask your Trac administrator for available attributes or reference http://trac.edgewall.org/wiki/TracTickets. By default Trac installation, the attributes include:

  • type - The nature of the ticket (for example, defect or enhancement request)
  • reporter - The author of the ticket.
  • summary - A brief description summarizing the problem or issue.
  • description - The body of the ticket.
  • component - The project module or subsystem this ticket concerns.
  • version - Version of the project that this ticket pertains to.
  • status - What is the current status? One of new, assigned, closed, reopened or whatever you add/customize in the Trac.
  • resolution - Reason for why a ticket was closed.
  • priority - The importance of this issue, ranging from trivial to blocker.
  • milestone - When this issue should be resolved at the latest.
  • owner - Principal person responsible for handling the issue.
  • cc - A comma-separated list of other users or E-Mail addresses to notify.
  • comment - Add a comment to the ticket

These attributes can be used not only in the Update Trac Ticket step, but also in the commit commands.

Release Milestone

To release milestone to Trac server, a Release Trac Milestone step should be added to your build workflow. The step will help you to release a milestone to your Trac server, the milestone version will use the build version and also this step will set milestone field of all tickets mentioned in the commit messages from previous successful build.

Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.