Skip to content

Commit 6742cb4

Browse files
authored
Don't create finding JIRAs on a bulk update if we are creating a finding group JIRA (DefectDojo#6709)
1 parent f54fff8 commit 6742cb4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

dojo/finding/views.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2045,6 +2045,7 @@ def finding_bulk_update_all(request, pid=None):
20452045
success_count = 0
20462046
finding_groups = set([find.finding_group for find in finds if find.has_finding_group])
20472047
logger.debug('finding_groups: %s', finding_groups)
2048+
groups_pushed_to_jira = False
20482049
for group in finding_groups:
20492050
if form.cleaned_data.get('push_to_jira'):
20502051
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):
20612062

20622063
if success_count > 0:
20632064
add_success_message_to_response('%i finding groups pushed to JIRA successfully' % success_count)
2065+
groups_pushed_to_jira = True
20642066

20652067
# refresh from db
20662068
finds = finds.all()
@@ -2081,7 +2083,7 @@ def finding_bulk_update_all(request, pid=None):
20812083

20822084
# can't use helper as when push_all_jira_issues is True, the checkbox gets disabled and is always false
20832085
# 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')):
20852087

20862088
can_be_pushed_to_jira, error_message, error_code = jira_helper.can_be_pushed_to_jira(finding)
20872089
if finding.has_jira_group_issue and not finding.has_jira_issue:

0 commit comments

Comments
 (0)