From d09126409150f4e27cd64eab119aa152995e9ee2 Mon Sep 17 00:00:00 2001 From: Kelly Kelly Date: Tue, 5 Oct 2021 14:36:55 -0400 Subject: [PATCH] Removed current case from the CVT summary list of other occurences --- .../relationships/CorrelationCaseChildNodeFactory.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Core/src/org/sleuthkit/autopsy/communications/relationships/CorrelationCaseChildNodeFactory.java b/Core/src/org/sleuthkit/autopsy/communications/relationships/CorrelationCaseChildNodeFactory.java index 1e2b350669..43be8d7f4b 100755 --- a/Core/src/org/sleuthkit/autopsy/communications/relationships/CorrelationCaseChildNodeFactory.java +++ b/Core/src/org/sleuthkit/autopsy/communications/relationships/CorrelationCaseChildNodeFactory.java @@ -29,6 +29,7 @@ import org.openide.nodes.ChildFactory; import org.openide.nodes.Children; import org.openide.nodes.Node; import org.openide.nodes.Sheet; +import org.sleuthkit.autopsy.casemodule.Case; import org.sleuthkit.autopsy.centralrepository.datamodel.CentralRepoAccount; import org.sleuthkit.autopsy.centralrepository.datamodel.CorrelationAttributeInstance; import org.sleuthkit.autopsy.centralrepository.datamodel.CorrelationAttributeNormalizationException; @@ -73,6 +74,8 @@ final class CorrelationCaseChildNodeFactory extends ChildFactory uniqueCaseMap = new HashMap<>(); + + String currentCaseName = Case.getCurrentCase().getName(); accounts.forEach((account) -> { try { @@ -81,7 +84,9 @@ final class CorrelationCaseChildNodeFactory extends ChildFactory correlationInstances = dbInstance.getArtifactInstancesByTypeValue(optCorrelationType.get(), account.getTypeSpecificID()); correlationInstances.forEach((correlationInstance) -> { CorrelationCase correlationCase = correlationInstance.getCorrelationCase(); - uniqueCaseMap.put(correlationCase.getCaseUUID(), correlationCase); + if(!correlationCase.getCaseUUID().equals(currentCaseName)) { + uniqueCaseMap.put(correlationCase.getCaseUUID(), correlationCase); + } }); } } catch (CentralRepoException | CorrelationAttributeNormalizationException ex) {