diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/fetchoptions/samplelister/ISampleListingQuery.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/fetchoptions/samplelister/ISampleListingQuery.java
index 9e2631aa756607e65756c0d6b992f26317cb2584..29dff6598ee0e60478ebc6afa68be40ea647c002 100644
--- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/fetchoptions/samplelister/ISampleListingQuery.java
+++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/fetchoptions/samplelister/ISampleListingQuery.java
@@ -44,12 +44,13 @@ public interface ISampleListingQuery extends BaseQuery
             + "s.modification_timestamp as s_modification_timestamp, sp.code as sp_code, "
             + "st.id as st_id, st.code as st_code, pe.first_name as pe_first_name, "
             + "pe.last_name as pe_last_name, pe.user_id as pe_user_id, pe.email as pe_email, "
-            + "e.code as exp_code, p.code as proj_code, ps.code as proj_space_code, "
+            + "e.code as exp_code, p.code as proj_code, ps.code as proj_space_code, sap.code as samp_proj_code, "
             + "mod.first_name as mod_first_name, mod.last_name as mod_last_name, "
             + "mod.user_id as mod_user_id, mod.email as mod_email "
             + "from samples as s join sample_types as st on s.saty_id = st.id "
             + "left join samples as cs on s.samp_id_part_of = cs.id "
             + "left join spaces as sp on s.space_id = sp.id "
+            + "left join projects as sap on s.proj_id = sap.id "
             + "left join experiments as e on s.expe_id = e.id "
             + "left join projects as p on e.proj_id = p.id "
             + "left join spaces as ps on p.space_id = ps.id "
diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/fetchoptions/samplelister/SampleLister.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/fetchoptions/samplelister/SampleLister.java
index 7a0d6b1c735df4536f3be6b2a1701b9417e0b1ed..8048450ace19bdc426b0f584c0bb4b81a3380db9 100644
--- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/fetchoptions/samplelister/SampleLister.java
+++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/fetchoptions/samplelister/SampleLister.java
@@ -368,8 +368,14 @@ public class SampleLister implements ISampleLister
             sampleCode = containerCode + ":" + sampleCode;
         }
         initializer.setCode(sampleCode);
-        initializer.setIdentifier(spaceCode == null ? "/" + sampleCode : "/" + spaceCode + "/"
-                + sampleCode);
+        if (sampleRecord.samp_proj_code != null)
+        {
+            initializer.setIdentifier("/" + spaceCode + "/" + sampleRecord.samp_proj_code + "/" + sampleCode);
+        } else
+        {
+            initializer.setIdentifier(spaceCode == null ? "/" + sampleCode : "/" + spaceCode + "/"
+                    + sampleCode);
+        }
         initializer.setPermId(sampleRecord.s_perm_id);
         EntityRegistrationDetailsInitializer detailsInitializer =
                 new EntityRegistrationDetailsInitializer();
diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/fetchoptions/samplelister/SampleRecord.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/fetchoptions/samplelister/SampleRecord.java
index daf6fdfc28b44192e745c7cacaf6925e937818b2..ce5cb37886dd15977e5463c30c5f245057870f61 100644
--- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/fetchoptions/samplelister/SampleRecord.java
+++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/fetchoptions/samplelister/SampleRecord.java
@@ -69,7 +69,9 @@ public class SampleRecord
     public String proj_code;
 
     public String proj_space_code;
-
+    
+    public String samp_proj_code;
+    
     public List<SampleRecord> children;
 
     public List<SampleRecord> parents;