From 881e5a780c6334a44f2b82c9b2dc372b8573014f Mon Sep 17 00:00:00 2001 From: Paul Osinski <42211303+paulOsinski@users.noreply.github.com> Date: Wed, 4 Feb 2026 15:33:29 -0500 Subject: [PATCH] Update views.py --- dojo/jira_link/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dojo/jira_link/views.py b/dojo/jira_link/views.py index 31841c9bf43..f130d5b32a0 100644 --- a/dojo/jira_link/views.py +++ b/dojo/jira_link/views.py @@ -345,11 +345,11 @@ def post(self, request): # Get the open and close keys msg = "Unable to find Open/Close ID's (invalid issue key specified?). They will need to be found manually" try: + open_key = close_key = None issue_id = jform.cleaned_data.get("issue_key") key_url = jira_server.strip("/") + "/rest/api/latest/issue/" + issue_id + "/transitions?expand=transitions.fields" response = jira._session.get(key_url).json() logger.debug("Retrieved JIRA issue successfully") - open_key = close_key = None for node in response["transitions"]: if node["to"]["statusCategory"]["name"] == "To Do": open_key = open_key or int(node["id"])