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:
<pre style="font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; color: rgb(0, 0, 0); background-color: rgb(238, 238, 238); font-size: 12px; border: 1px dashed rgb(153, 153, 153); line-height: 14px; padding: 5px; overflow: auto; width: 100%;">
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.