@@ -968,8 +968,9 @@ def process_jira_form(self, request: HttpRequest, finding: Finding, context: dic
968968 logger .debug ("jform.jira_issue: %s" , context ["jform" ].cleaned_data .get ("jira_issue" ))
969969 logger .debug (JFORM_PUSH_TO_JIRA_MESSAGE , context ["jform" ].cleaned_data .get ("push_to_jira" ))
970970 # can't use helper as when push_all_jira_issues is True, the checkbox gets disabled and is always false
971+ push_to_jira_checkbox = context ["jform" ].cleaned_data .get ("push_to_jira" )
971972 push_all_jira_issues = jira_helper .is_push_all_issues (finding )
972- push_to_jira = push_all_jira_issues or context [ "jform" ]. cleaned_data . get ( "push_to_jira" )
973+ push_to_jira = push_all_jira_issues or push_to_jira_checkbox or jira_helper . is_keep_in_sync_with_jira ( finding )
973974 logger .debug ("push_to_jira: %s" , push_to_jira )
974975 logger .debug ("push_all_jira_issues: %s" , push_all_jira_issues )
975976 logger .debug ("has_jira_group_issue: %s" , finding .has_jira_group_issue )
@@ -996,12 +997,6 @@ def process_jira_form(self, request: HttpRequest, finding: Finding, context: dic
996997 jira_helper .finding_link_jira (request , finding , new_jira_issue_key )
997998 jira_message = "Linked a JIRA issue successfully."
998999 # any existing finding should be updated
999- jira_instance = jira_helper .get_jira_instance (finding )
1000- push_to_jira = (
1001- push_to_jira
1002- and not (push_to_jira and finding .finding_group )
1003- and (finding .has_jira_issue or (jira_instance and jira_instance .finding_jira_sync ))
1004- )
10051000 # Determine if a message should be added
10061001 if jira_message :
10071002 messages .add_message (
0 commit comments