Tuesday, May 18, 2010

Generating release notes with Trac and TracWiki

Trac is a very basic but efficient SCM tool, it lacks many of the features you may find in tools like Jira but, hey it's free, open and based on Python. Trac consists of a number of Modules, two of the major ones are Trac tickets management and TracWiki, the first is the core feature of Trac and the later is a basic Wiki module. Trac also lets you integrate the two modules, you can bring Tickets data into a Wiki page and vice versa.

Release notes are often used in order to track the changes of a certain product release. Here's a simple trick which will help you generate TracWiki pages and templates for your release notes, it's based on the TracQuery feature, a simple SQL like query language which helps you search for Trac tickets from TracWiki. Here's how it works...

In Trac, I have a track project called MyProject, each project ticket whether it is a defects or enhancements is associated with a specific version of MyProject.

In track wiki I create a very simple wiki page which will be used as the release notes for version 1.04. I will use TracQuery in order to retrieve the Tickets that represent changes in version 1.04, I will now add the following line to my wiki page:


In the above code sinppet I simply told Trac to display all tickets that are under version 1.04 and are in a fixed state. The query returns the tickets list as a table, my release notes will be updated as more tickets are closed, that during the the development process I can see which tickets will be present in the release.

As you can see above, the script creates a nice table with the relevant tickets and fields in my wiki page.


shvilam said...

nice I all way knew that I need to upgrade from Bugzilla.

Lior Boord said...

Yes, unlike Bugzilla Trac is so much more then just bug tracing.

shvilam said...

not programer in our team complain that it is hard to work with Bugzilla this is the main rezone that i first thouth of Trac

Lior Boord said...

Have you tried working with mylyn? I think it's a very good solution for developers who do not like to work with Bugzilla's web interface.


shvilam said...

Yes we are working with mylyn from day one have nice commit with task/bug associate to it
it have nice focus when you work on task or on bug

Anonymous said...

Thanks very much. I used something very similar to nearly achieve what I was after

What I'd really like is to display the close time in date-time format. I can't seem to find a way to do this. Changetime is obviously not always going to be the same as close time.