From 466ce46204c6ee55ca8f64ac266c2c279789e9dd Mon Sep 17 00:00:00 2001
From: "U-BASIS\\dsmyda" <dsmyda@win-dsmyd-2925.basistech.net>
Date: Thu, 10 Dec 2020 16:35:51 -0500
Subject: [PATCH] Updated blackboard attribute to populate the parent data
 source ID if it's not specified

---
 .../src/org/sleuthkit/datamodel/BlackboardAttribute.java    | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/bindings/java/src/org/sleuthkit/datamodel/BlackboardAttribute.java b/bindings/java/src/org/sleuthkit/datamodel/BlackboardAttribute.java
index 78a7388d9..0d34029b7 100755
--- a/bindings/java/src/org/sleuthkit/datamodel/BlackboardAttribute.java
+++ b/bindings/java/src/org/sleuthkit/datamodel/BlackboardAttribute.java
@@ -65,7 +65,7 @@ public class BlackboardAttribute {
 	
 	// The parent data source is defined as being 
 	// the data source of the parent artifact.
-	private long parentDataSourceID;
+	private Long parentDataSourceID;
 
 	/**
 	 * Constructs a standard attribute with an integer value. The attribute
@@ -542,6 +542,10 @@ public String getDisplayString() {
 
 			case DATETIME: {
 				try {
+					if (parentDataSourceID == null) {
+						BlackboardArtifact parent = getParentArtifact();
+						parentDataSourceID = parent.getDataSourceObjectID();
+					}
 					final Content dataSource = sleuthkitCase.getContentById(parentDataSourceID);
 					if ((dataSource != null) && (dataSource instanceof Image)) {
 						// return the date/time string in the timezone associated with the datasource,
-- 
GitLab