Skip to content

Commit 7c6cd77

Browse files
committed
update
1 parent dc64088 commit 7c6cd77

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

dojo/importers/default_reimporter.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff 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,

0 commit comments

Comments
 (0)