@@ -359,6 +359,8 @@ def process_findings(
359359 unsaved_finding ,
360360 existing_finding ,
361361 )
362+ # Findings that have already exist cannot be moved to into a group
363+ finding_will_be_grouped = False
362364 # Determine if we should skip the rest of the loop
363365 if force_continue :
364366 continue
@@ -374,7 +376,7 @@ def process_findings(
374376 self .user ,
375377 )
376378 else :
377- finding = self .process_finding_that_was_not_matched (unsaved_finding )
379+ finding , finding_will_be_grouped = self .process_finding_that_was_not_matched (unsaved_finding )
378380
379381 # Add newly created finding to candidates for subsequent findings in this batch
380382 self .add_new_finding_to_candidates (
@@ -392,7 +394,7 @@ def process_findings(
392394 unsaved_finding ,
393395 )
394396 # all data is already saved on the finding, we only need to trigger post processing in batches
395- push_to_jira = self .push_to_jira and (not self .findings_groups_enabled or not self .group_by )
397+ push_to_jira = self .push_to_jira and (( not self .findings_groups_enabled or not self .group_by ) or not finding_will_be_grouped )
396398 batch_finding_ids .append (finding .id )
397399
398400 # Post-processing batches (deduplication, rules, etc.) are separate from matching batches.
@@ -827,7 +829,7 @@ def process_matched_active_finding(
827829 def process_finding_that_was_not_matched (
828830 self ,
829831 unsaved_finding : Finding ,
830- ) -> Finding :
832+ ) -> tuple [ Finding , bool ] :
831833 """Create a new finding from the one parsed from the report"""
832834 # Set some explicit settings
833835 unsaved_finding .reporter = self .user
@@ -855,15 +857,15 @@ def process_finding_that_was_not_matched(
855857 f"({ finding .component_name } - { finding .component_version } )" ,
856858 )
857859 # Manage the finding grouping selection
858- self .process_finding_groups (
860+ finding_will_be_grouped = self .process_finding_groups (
859861 unsaved_finding ,
860862 self .group_names_to_findings_dict ,
861863 )
862864 # Add the new finding to the list
863865 self .new_items .append (unsaved_finding )
864866 # Process any request/response pairs
865867 self .process_request_response_pairs (unsaved_finding )
866- return unsaved_finding
868+ return unsaved_finding , finding_will_be_grouped
867869
868870 def reconcile_vulnerability_ids (
869871 self ,
0 commit comments