Skip to content

Commit 3e3939d

Browse files
add duedate syncing
1 parent ca8c266 commit 3e3939d

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

dojo/jira_link/helper.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1027,6 +1027,11 @@ def failure_to_update_message(message: str, exception: Exception, obj: Any) -> b
10271027
if isinstance(obj, Finding_Group):
10281028
jira_priority_name = jira_priority(obj)
10291029

1030+
# Determine what due date to set on the jira issue
1031+
duedate = None
1032+
if System_Settings.objects.get().enable_finding_sla:
1033+
duedate = get_sla_deadline(obj)
1034+
10301035
# Set the fields that will compose the jira issue
10311036
try:
10321037
issuetype_fields = get_issuetype_fields(jira, jira_project.project_key, jira_instance.default_issue_type)
@@ -1039,6 +1044,7 @@ def failure_to_update_message(message: str, exception: Exception, obj: Any) -> b
10391044
labels=labels + issue.fields.labels,
10401045
environment=jira_environment(obj),
10411046
priority_name=jira_priority_name,
1047+
duedate=duedate,
10421048
issuetype_fields=issuetype_fields)
10431049
except Exception as e:
10441050
message = f"Failed to fetch fields for {jira_instance.default_issue_type} under project {jira_project.project_key} - {e}"

0 commit comments

Comments
 (0)