bodhi/model.py | 15 +++++++++++++++
1 file changed, 15 insertions(+)
New commits:
commit c9fa5b3b9bb9481404d0760041b133de71d43727
Author: Luke Macken <lmacken(a)redhat.com>
Date: Tue Aug 10 14:55:17 2010 -0400
Set bugs to MODIFIED upon submission (#343)
diff --git a/bodhi/model.py b/bodhi/model.py
index 04a2dcb..ae30713 100644
--- a/bodhi/model.py
+++ b/bodhi/model.py
@@ -688,6 +688,7 @@ class PackageUpdate(SQLObject):
newbug = bugzilla.getbug(bug)
bz = Bugzilla(bz_id=newbug.bug_id)
bz.fetch_details(newbug)
+ bz.modified()
else:
bz = Bugzilla(bz_id=int(bug))
if bz not in self.bugs:
@@ -1197,6 +1198,20 @@ class Bugzilla(SQLObject):
log.error("Unable to add comment to bug #%d\n%s" % (self.bz_id,
str(e)))
+ def modified(self):
+ """ Change the status of this bug to MODIFIED """
+ bz = Bugzilla.get_bz()
+ log.debug("Setting Bug #%d to MODIFIED" % self.bz_id)
+ try:
+ bug = bz.getbug(self.bz_id)
+ if bug.product not in config.get('bz_products',
'').split(','):
+ log.warning("Skipping %r bug" % bug.product)
+ return
+ if bug.bug_status != 'MODIFIED':
+ bug.setstatus('MODIFIED')
+ except Exception, e:
+ log.error("Unable to alter bug #%d\n%s" % (self.bz_id, str(e)))
+
def testing(self, update):
"""
Change the status of this bug to ON_QA, and comment on the bug with
Show replies by date