Patch Trac to sort ticket version field alphabetically


  • The comment you are replying to does not exist.
  • : Function split() is deprecated in /home/jesptho4/public_html/drupal/modules/filter/filter.module on line 1190.
  • : Function split() is deprecated in /home/jesptho4/public_html/drupal/modules/filter/filter.module on line 1190.
  • : Function split() is deprecated in /home/jesptho4/public_html/drupal/modules/filter/filter.module on line 1190.
  • : Function split() is deprecated in /home/jesptho4/public_html/drupal/modules/filter/filter.module on line 1190.
  • : Function split() is deprecated in /home/jesptho4/public_html/drupal/modules/filter/filter.module on line 1190.
  • : Function split() is deprecated in /home/jesptho4/public_html/drupal/modules/filter/filter.module on line 1190.
  • : Function split() is deprecated in /home/jesptho4/public_html/drupal/modules/filter/filter.module on line 1190.
  • : Function split() is deprecated in /home/jesptho4/public_html/drupal/modules/filter/filter.module on line 1190.
  • : Function split() is deprecated in /home/jesptho4/public_html/drupal/modules/filter/filter.module on line 1190.
  • : Function split() is deprecated in /home/jesptho4/public_html/drupal/modules/filter/filter.module on line 1190.
  • : Function split() is deprecated in /home/jesptho4/public_html/drupal/modules/filter/filter.module on line 1190.
  • : Function split() is deprecated in /home/jesptho4/public_html/drupal/modules/filter/filter.module on line 1190.
June 8, 2011 - 16:52

This is a super simple hack that you can apply to your Trac installation to get your version selection field sorted alphabetically in the newticket form. Very trivial, but posting it to make the solution googlable for others.

Apply to:
/usr/lib/python/site-packages/Trac.egg/trac/ticket/model.py

873,874c873,874
<             return (v.time or utcmax, embedded_numbers(v.name))
<         return sorted(versions, key=version_order, reverse=True)
---
>             return (v.name.lower() or utcmax, embedded_numbers(v.name))
>         return sorted(versions, key=version_order, reverse=False)