@@ -2045,6 +2045,7 @@ def finding_bulk_update_all(request, pid=None):
2045
2045
success_count = 0
2046
2046
finding_groups = set ([find .finding_group for find in finds if find .has_finding_group ])
2047
2047
logger .debug ('finding_groups: %s' , finding_groups )
2048
+ groups_pushed_to_jira = False
2048
2049
for group in finding_groups :
2049
2050
if form .cleaned_data .get ('push_to_jira' ):
2050
2051
can_be_pushed_to_jira , error_message , error_code = jira_helper .can_be_pushed_to_jira (group )
@@ -2061,6 +2062,7 @@ def finding_bulk_update_all(request, pid=None):
2061
2062
2062
2063
if success_count > 0 :
2063
2064
add_success_message_to_response ('%i finding groups pushed to JIRA successfully' % success_count )
2065
+ groups_pushed_to_jira = True
2064
2066
2065
2067
# refresh from db
2066
2068
finds = finds .all ()
@@ -2081,7 +2083,7 @@ def finding_bulk_update_all(request, pid=None):
2081
2083
2082
2084
# can't use helper as when push_all_jira_issues is True, the checkbox gets disabled and is always false
2083
2085
# push_to_jira = jira_helper.is_push_to_jira(new_finding, form.cleaned_data.get('push_to_jira'))
2084
- if jira_helper .is_push_all_issues (finding ) or form .cleaned_data .get ('push_to_jira' ):
2086
+ if not groups_pushed_to_jira and ( jira_helper .is_push_all_issues (finding ) or form .cleaned_data .get ('push_to_jira' ) ):
2085
2087
2086
2088
can_be_pushed_to_jira , error_message , error_code = jira_helper .can_be_pushed_to_jira (finding )
2087
2089
if finding .has_jira_group_issue and not finding .has_jira_issue :
0 commit comments