Skip to content

Commit

Permalink
fix for minor e.text error, minor grammar issue
Browse files Browse the repository at this point in the history
  • Loading branch information
hblankenship committed Dec 30, 2024
1 parent f9c71b9 commit 5cefb23
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 3 additions & 3 deletions dojo/fixtures/dojo_testdata.json
Original file line number Diff line number Diff line change
Expand Up @@ -2158,8 +2158,8 @@
"fields": {
"configuration_name": "Happy little JIRA 2",
"url": "https://defectdojo.atlassian.net/",
"username": "YOUR USERNAME",
"password": "YOU API TOKEN",
"username": "[YOUR USERNAME]",
"password": "[YOUR API TOKEN]",
"default_issue_type": "Task",
"epic_name_id": 10011,
"open_status_key": 11,
Expand Down Expand Up @@ -2253,7 +2253,7 @@
"component": "",
"enable_engagement_epic_mapping": true,
"jira_instance": 2,
"project_key": "key1"
"project_key": "NTEST"
}
},
{
Expand Down
4 changes: 3 additions & 1 deletion dojo/jira_link/helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -785,14 +785,15 @@ def failure_to_add_message(message: str, exception: Exception, object: Any) -> b
JIRAError.log_to_tempfile = False
jira = get_jira_connection(jira_instance)
except Exception as e:
message = f"The following jira instance could not be connected: {jira_instance} - {e.text}"
message = f"The following jira instance could not be connected: {jira_instance} - {e}"
return failure_to_add_message(message, e, obj)
# Set the list of labels to set on the jira issue
labels = get_labels(obj) + get_tags(obj)
if labels:
labels = list(dict.fromkeys(labels)) # de-dup
# Determine what due date to set on the jira issue
duedate = None

if System_Settings.objects.get().enable_finding_sla:
duedate = obj.sla_deadline()
# Set the fields that will compose the jira issue
Expand Down Expand Up @@ -1104,6 +1105,7 @@ def get_issuetype_fields(

issuetype_fields = None
use_cloud_api = jira.deploymentType.lower() == "cloud" or jira._version < (9, 0, 0)

try:
if use_cloud_api:
try:
Expand Down

0 comments on commit 5cefb23

Please sign in to comment.