New submission from Berker Peksag:
>From https://wiki.python.org/moin/DesiredTrackerFeatures
> When an issue is closed stage should be automatically set to 'resolved'.
----------
files: setresolved.diff
messages: 3041
nosy: berker.peksag
priority: feature
status: unread
title: Set stage to 'resolved' when an issue is closed
_______________________________________________________
PSF Meta Tracker <metatrac...@psf.upfronthosting.co.za>
<http://psf.upfronthosting.co.za/roundup/meta/issue595>
_______________________________________________________
diff --git a/detectors/setresolved.py b/detectors/setresolved.py
new file mode 100644
--- /dev/null
+++ b/detectors/setresolved.py
@@ -0,0 +1,11 @@
+def setresolved(db, cl, nodeid, newvalues):
+ status_change = newvalues.get('status')
+ status_close = status_change and newvalues.get('status') ==
db.status.lookup('closed')
+
+ if status_close:
+ if newvalues.get('stage') is None:
+ newvalues['stage'] = db.stage.lookup('resolved')
+
+
+def init(db):
+ db.issue.audit('set', setresolved)
_______________________________________________
Tracker-discuss mailing list
Tracker-discuss@python.org
https://mail.python.org/mailman/listinfo/tracker-discuss
Code of Conduct: https://www.python.org/psf/codeofconduct/