File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -327,6 +327,7 @@ def post(self, request):
327327 return render (request , self .get_template (), {"jform" : jform })
328328 # authentication successful
329329 # Get the open and close keys
330+ msg = "Unable to find Open/Close ID's (invalid issue key specified?). They will need to be found manually"
330331 try :
331332 issue_id = jform .cleaned_data .get ("issue_key" )
332333 key_url = jira_server .strip ("/" ) + "/rest/api/latest/issue/" + issue_id + "/transitions?expand=transitions.fields"
@@ -339,8 +340,9 @@ def post(self, request):
339340 if node ["to" ]["statusCategory" ]["name" ] == "Done" :
340341 close_key = close_key or int (node ["id" ])
341342 except Exception :
342- msg = "Unable to find Open/Close ID's (invalid issue key specified?). They will need to be found manually"
343343 logger .exception (msg ) # already logged in jira_helper
344+
345+ if not open_key or not close_key :
344346 messages .add_message (
345347 request ,
346348 messages .ERROR ,
You can’t perform that action at this time.
0 commit comments