[Python-checkins] r80511 - tracker/instances/python-dev/detectors/priorityauditor.py

martin.v.loewis python-checkins at python.org
Mon Apr 26 22:31:07 CEST 2010


Author: martin.v.loewis
Date: Mon Apr 26 22:31:06 2010
New Revision: 80511

Log:
Set default priority to normal.


Added:
   tracker/instances/python-dev/detectors/priorityauditor.py   (contents, props changed)

Added: tracker/instances/python-dev/detectors/priorityauditor.py
==============================================================================
--- (empty file)
+++ tracker/instances/python-dev/detectors/priorityauditor.py	Mon Apr 26 22:31:06 2010
@@ -0,0 +1,11 @@
+def init_priority(db, cl, nodeid, newvalues):
+    """ Make sure the priority is set on new issues"""
+
+    if newvalues.has_key('priority') and newvalues['priority']:
+        return
+
+    normal = db.priority.lookup('normal')
+    newvalues['priority'] = normal
+
+def init(db):
+    db.issue.audit('create', init_priority)


More information about the Python-checkins mailing list