From: stefan Date: Sun, 31 Oct 2010 23:36:48 +0000 (+0000) Subject: Fix detectors for devel tracker template. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=53829f5b0feb0a21728a803644b2334ce43823bc;p=roundup.git Fix detectors for devel tracker template. git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/roundup/trunk@4559 57a73879-2fb5-44c3-a270-3262357dd7e2 --- diff --git a/share/roundup/templates/devel/detectors/nosyreaction.py b/share/roundup/templates/devel/detectors/nosyreaction.py index 67380a0..a1a1536 100644 --- a/share/roundup/templates/devel/detectors/nosyreaction.py +++ b/share/roundup/templates/devel/detectors/nosyreaction.py @@ -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) diff --git a/share/roundup/templates/devel/detectors/patches.py b/share/roundup/templates/devel/detectors/patches.py index d79f367..033f91d 100644 --- a/share/roundup/templates/devel/detectors/patches.py +++ b/share/roundup/templates/devel/detectors/patches.py @@ -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) diff --git a/share/roundup/templates/devel/detectors/severityauditor.py b/share/roundup/templates/devel/detectors/severityauditor.py index 721c179..288009d 100644 --- a/share/roundup/templates/devel/detectors/severityauditor.py +++ b/share/roundup/templates/devel/detectors/severityauditor.py @@ -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) diff --git a/share/roundup/templates/devel/detectors/statusauditor.py b/share/roundup/templates/devel/detectors/statusauditor.py index e68169f..4c7c36b 100644 --- a/share/roundup/templates/devel/detectors/statusauditor.py +++ b/share/roundup/templates/devel/detectors/statusauditor.py @@ -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) diff --git a/share/roundup/templates/devel/initial_data.py b/share/roundup/templates/devel/initial_data.py index d9695bb..faa9b22 100644 --- a/share/roundup/templates/devel/initial_data.py +++ b/share/roundup/templates/devel/initial_data.py @@ -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")