Download DB2 Upgrade DB2

Make Tickets by Milestone view more useful in Trac

October 30th, 2008 by Leons Petrazickis

Trac is a great bug tracking, work ticket, action item management environment. It integrates well with SVN and other source control repositories.

Its Roadmap view conveniently order milestones by due date. However, the custom report queries it comes with order milestones by their name. Frankly, that’s much less useful. I understand that they are replacing the SQL-driven custom reports with a customizable GUI interface, but in the meantime here’s how you can fix the issue:

  1. Go to Edit Report
  2. Insert this clause after any FROMs and before any ORDER BYs:
    LEFT JOIN milestone m ON m.name = t.milestone
     
  3. Prefix any ambiguous column names with a t.
  4. Insert due as the first column in the ORDER BY list

The report will now sort by milestone due date while allowing for empty milestones.

See Also

Posted in trac, svn | 1 Comment »

How to enable logging in python-ldap

December 18th, 2007 by Leons Petrazickis

When writing Python scripts which rely on python-ldap and openLDAP, it is often useful to turn on debug messages as follows:

import ldap;

# enable python-ldap logging
ldap.set_option(ldap.OPT_DEBUG_LEVEL, 4095)

# enable openLDAP logging
l = ldap.initialize(‘ldap://yourserver:port’, trace_level=2)
 

This is also useful when debugging the LDAP Plugin for Trac.

Posted in python, ldap, trac | No Comments »