Code

Fix detectors for devel tracker template.
authorstefan <stefan@57a73879-2fb5-44c3-a270-3262357dd7e2>
Sun, 31 Oct 2010 23:36:48 +0000 (23:36 +0000)
committerstefan <stefan@57a73879-2fb5-44c3-a270-3262357dd7e2>
Sun, 31 Oct 2010 23:36:48 +0000 (23:36 +0000)
git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/roundup/trunk@4559 57a73879-2fb5-44c3-a270-3262357dd7e2

share/roundup/templates/devel/detectors/nosyreaction.py
share/roundup/templates/devel/detectors/patches.py
share/roundup/templates/devel/detectors/severityauditor.py
share/roundup/templates/devel/detectors/statusauditor.py
share/roundup/templates/devel/initial_data.py

index 67380a0333c99325aefc9d5ff3dc5d67a676d529..a1a1536f62996a48c7c95ed2881eccd85520bf91 100644 (file)
@@ -116,7 +116,17 @@ def updatenosy(db, cl, nodeid, newvalues):
         newvalues['nosy'] = list(new_nosy)
 
 def init(db):
-    db.issue.react('create', nosyreaction)
-    db.issue.react('set', nosyreaction)
-    db.issue.audit('create', updatenosy)
-    db.issue.audit('set', updatenosy)
+    db.bug.react('create', nosyreaction)
+    db.bug.react('set', nosyreaction)
+    db.bug.audit('create', updatenosy)
+    db.bug.audit('set', updatenosy)
+
+    db.task.react('create', nosyreaction)
+    db.task.react('set', nosyreaction)
+    db.task.audit('create', updatenosy)
+    db.task.audit('set', updatenosy)
+
+    db.milestone.react('create', nosyreaction)
+    db.milestone.react('set', nosyreaction)
+    db.milestone.audit('create', updatenosy)
+    db.milestone.audit('set', updatenosy)
index d79f367c19171541389a250e14ec959b133300e6..033f91db48b89916ee435dde4b7ea2d1a162fc11 100644 (file)
@@ -19,7 +19,7 @@ def patches_keyword(db, cl, nodeid, newvalues):
     # Check whether there are any new files
     newfiles = set(newvalues.get('files',()))
     if nodeid:
-        newfiles -= set(db.issue.get(nodeid, 'files'))
+        newfiles -= set(db.bug.get(nodeid, 'files'))
     # Check whether any of these is a patch
     newpatch = False
     for fileid in newfiles:
@@ -31,7 +31,7 @@ def patches_keyword(db, cl, nodeid, newvalues):
         patchid = db.keyword.lookup("patch")
         oldkeywords = []
         if nodeid:
-            oldkeywords = db.issue.get(nodeid, 'keywords')
+            oldkeywords = db.bug.get(nodeid, 'keywords')
             if patchid in oldkeywords:
                 # This is already marked as a patch
                 return
@@ -41,5 +41,5 @@ def patches_keyword(db, cl, nodeid, newvalues):
 
 def init(db): pass
 #    db.file.audit('create', patches_text_plain)
-#    db.issue.audit('create', patches_keyword)
-#    db.issue.audit('set', patches_keyword)
+#    db.bug.audit('create', patches_keyword)
+#    db.bug.audit('set', patches_keyword)
index 721c17949286c2499a300d89075bc0b1015bdcc2..288009d73d8c1c871a5f2dbe642a66e358171b93 100644 (file)
@@ -1,6 +1,6 @@
 
 def init_severity(db, cl, nodeid, newvalues):
-    """Make sure severity is set on new issues"""
+    """Make sure severity is set on new bugs"""
     if newvalues.has_key('severity') and newvalues['severity']:
         return
 
@@ -8,4 +8,4 @@ def init_severity(db, cl, nodeid, newvalues):
     newvalues['severity'] = normal
 
 def init(db): pass
-    #db.issue.audit('create', init_severity)
+    #db.bug.audit('create', init_severity)
index e68169f47b690eec2f71f33945d7843e7be8cf34..4c7c36b2682ff5dfc54d18a496eb2dfb735c411a 100644 (file)
@@ -1,5 +1,5 @@
 def preset_new(db, cl, nodeid, newvalues):
-    """ Make sure the status is set on new issues"""
+    """ Make sure the status is set on new bugs"""
 
     if newvalues.has_key('status') and newvalues['status']:
         return
@@ -10,4 +10,4 @@ def preset_new(db, cl, nodeid, newvalues):
 
 def init(db): pass
     # fire before changes are made
-    #db.issue.audit('create', preset_new)
+    #db.bug.audit('create', preset_new)
index d9695bb4871766f6384b699e1ede48981649f2fc..faa9b22c874d365fe36127df9ebe77952f63aa03 100644 (file)
@@ -71,6 +71,22 @@ user.create(username="anonymous", roles='Anonymous')
 user.create(username="user", roles='User')
 user.create(username="developer", roles='User, Developer')
 user.create(username="coordinator", roles='User, Developer, Coordinator')
+user.create(username="user1", roles='User')
+user.create(username="user2", roles='User')
+user.create(username="user3", roles='User')
+user.create(username="user4", roles='User')
+user.create(username="user5", roles='User')
+user.create(username="user6", roles='User')
+user.create(username="user7", roles='User')
+user.create(username="user8", roles='User')
+user.create(username="user9", roles='User')
+user.create(username="user0", roles='User')
+user.create(username="user10", roles='User')
+user.create(username="user11", roles='User')
+user.create(username="user12", roles='User')
+user.create(username="user13", roles='User')
+user.create(username="user14", roles='User')
+user.create(username="user15", roles='User')
 
 bug = db.getclass('bug')
 bug.create(title="the first")