File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -479,6 +479,9 @@ def process_matched_mitigated_finding(
479479 to cover circumstances where mitigation timestamps are different, and
480480 decide which one to honor
481481 """
482+ if existing_finding .fix_available != unsaved_finding .fix_available :
483+ existing_finding .fix_available = unsaved_finding .fix_available
484+
482485 # if the reimported item has a mitigation time, we can compare
483486 if unsaved_finding .is_mitigated :
484487 # The new finding is already mitigated, so nothing to change on the
@@ -588,9 +591,8 @@ def process_matched_active_finding(
588591 # First check that the existing finding is definitely not mitigated
589592 if not (existing_finding .mitigated and existing_finding .is_mitigated ):
590593 logger .debug ("Reimported item matches a finding that is currently open." )
591- if unsaved_finding .fix_available :
592- logger .debug ("Reimported finding has a fix available now." )
593- existing_finding .fix_available = True
594+ if existing_finding .fix_available != unsaved_finding .fix_available :
595+ existing_finding .fix_available = unsaved_finding .fix_available
594596 if unsaved_finding .is_mitigated :
595597 logger .debug ("Reimported mitigated item matches a finding that is currently open, closing." )
596598 # TODO: Implement a date comparison for opened defectdojo findings before closing them by reimporting,
You can’t perform that action at this time.
0 commit comments