From 43594dc097267c55b329d2fa50d7543338ea93ad Mon Sep 17 00:00:00 2001
From: buczekp <buczekp>
Date: Wed, 30 Sep 2009 10:11:26 +0000
Subject: [PATCH] fixed bug with complex sample codes and identifiers when
 container level depth is 0

SVN: 12787
---
 .../server/business/bo/samplelister/SampleListingWorker.java  | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/samplelister/SampleListingWorker.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/samplelister/SampleListingWorker.java
index 2ea5a96a0c6..a50219ef687 100644
--- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/samplelister/SampleListingWorker.java
+++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/samplelister/SampleListingWorker.java
@@ -526,7 +526,9 @@ final class SampleListingWorker
             addToRequested(row.samp_id_generated_from, row.id, maxSampleParentResolutionDepth,
                     primarySample);
         }
-        if (row.samp_id_part_of != null & maxSampleContainerResolutionDepth > 0)
+        // even though maxSampleContainerResoutionDepth may be 0 we still need to load container
+        // for primary samples with container to create a 'full' code with container code part
+        if (row.samp_id_part_of != null & (primarySample || maxSampleContainerResolutionDepth > 0))
         {
             if (samplesAwaitingContainerResolution.containsKey(row.id) == false)
             {
-- 
GitLab