Permalink
Browse files

Allow to specify component ids

  • Loading branch information...
kmmbvnr committed Oct 19, 2011
1 parent 248764d commit fcb86d69a3f76c7653a52cf5e92688bf91aa0819
Showing with 10 additions and 2 deletions.
  1. +10 −2 django_jira/middleware.py
View
@@ -92,6 +92,14 @@ def process_exception(self, request, exc):
issue = settings.JIRA_ISSUE_DEFAULTS.copy()
issue['summary'] = issue_title
issue['description'] = issue_message
-
+
+ if 'components' in settings.JIRA_ISSUE_DEFAULTS:
+ components = []
+ for component_id in settings.JIRA_ISSUE_DEFAULTS['components']:
+ component = self._soap.factory.create('tns1:RemoteComponent')
+ component.id = component_id
+ components.append(component)
+ issue['components'] = components
+
self._soap.service.createIssue(self._auth, issue)
-
+

0 comments on commit fcb86d6

Please sign in to comment.