File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1272,17 +1272,18 @@ def close_finding(request, fid):
12721272 finding_in_group = finding .has_finding_group
12731273 # Check if there is a jira issue that needs to be updated
12741274 jira_issue_exists = finding .has_jira_issue or (finding .finding_group and finding .finding_group .has_jira_issue )
1275+ # fetch the project
1276+ jira_instance = jira_helper .get_jira_instance (finding )
1277+ jira_project = jira_helper .get_jira_project (finding )
12751278 # Only push if the finding is not in a group
12761279 if jira_issue_exists :
12771280 # Determine if any automatic sync should occur
1278- push_to_jira = jira_helper .is_push_all_issues (finding ) \
1279- or jira_helper .get_jira_instance (finding ).finding_jira_sync
1280- # Add the closing note
1281- if push_to_jira and not finding_in_group :
1282- jira_helper .add_comment (finding , new_note , force_push = True )
1281+ push_to_jira = jira_helper .is_push_all_issues (finding ) or jira_instance .finding_jira_sync
1282+ # Add the closing note
1283+ if (jira_project .push_notes or push_to_jira ) and not finding_in_group :
1284+ jira_helper .add_comment (finding , new_note , force_push = True )
12831285 # Save the finding
12841286 finding .save (push_to_jira = (push_to_jira and not finding_in_group ))
1285-
12861287 # we only push the group after saving the finding to make sure
12871288 # the updated data of the finding is pushed as part of the group
12881289 if push_to_jira and finding_in_group :
You can’t perform that action at this time.
0 commit comments