Permalink
Browse files

Add ability to not re-open WONTFIX issues

  • Loading branch information...
1 parent 5dad090 commit 248764db3b35ba407f2de4b68cab0351f90e95b8 @cnorthwood cnorthwood committed Feb 23, 2011
Showing with 6 additions and 2 deletions.
  1. +4 −1 README
  2. +2 −1 django_jira/middleware.py
View
@@ -41,4 +41,7 @@ JIRA_REOPEN_ACTION = The ID of the action to apply in JIRA to reopen an issue
that is closed (by default '3' is Reopen Issue)
JIRA_REPORT_IN_DEBUG = If set to True, then JIRA will report even if in DEBUG
- mode, by default it does not.
+ mode, by default it does not.
+
+JIRA_WONT_FIX = The ID of the "Won't Fix" resolution, Django-JIRA won't reopen
+ tickets with this resolution
@@ -27,6 +27,7 @@ def __init__(self):
try:
settings.JIRA_ISSUE_DEFAULTS
settings.JIRA_REOPEN_CLOSED
+ settings.JIRA_WONT_FIX
# Set up SOAP
self._soap = suds.client.Client(settings.JIRA_URL + 'rpc/soap/jirasoapservice-v2?wsdl')
@@ -75,7 +76,7 @@ def process_exception(self, request, exc):
if issue_title == issue.summary:
# If this issue is closed, reopen it
- if issue.status in settings.JIRA_REOPEN_CLOSED:
+ if issue.status in settings.JIRA_REOPEN_CLOSED and issue.resolution != settings.JIRA_WONT_FIX:
self._soap.service.progressWorkflowAction(self._auth, issue.key, settings.JIRA_REOPEN_ACTION, ())
# Add a comment

0 comments on commit 248764d

Please sign in to comment.