From ea77b951facd59bb631e517e31351ca6b5d08faa Mon Sep 17 00:00:00 2001
From: pkupczyk <pkupczyk>
Date: Fri, 31 Jan 2014 13:38:09 +0000
Subject: [PATCH] SP-1118 / BIS-628 : iPad App for Aebersold Lab - name sample
 category the same no matter what context it is used in (root sample,
 experiment sample, parent/child sample) - adding different names but using
 same perm ids confuses the ipad client

SVN: 30462
---
 .../ipad-read-service-v1/ipad_read.py                 | 11 ++---------
 1 file changed, 2 insertions(+), 9 deletions(-)

diff --git a/openbis-ipad/source/core-plugins/ipad-ui-tag-browser/1/dss/reporting-plugins/ipad-read-service-v1/ipad_read.py b/openbis-ipad/source/core-plugins/ipad-ui-tag-browser/1/dss/reporting-plugins/ipad-read-service-v1/ipad_read.py
index 44f07e9484d..ca27d7afed1 100644
--- a/openbis-ipad/source/core-plugins/ipad-ui-tag-browser/1/dss/reporting-plugins/ipad-read-service-v1/ipad_read.py
+++ b/openbis-ipad/source/core-plugins/ipad-ui-tag-browser/1/dss/reporting-plugins/ipad-read-service-v1/ipad_read.py
@@ -101,7 +101,7 @@ def createExperimentDictionaries(experiments, dictionaryType):
 	for experiment in experiments:
 		dictionary = {}
 		dictionary['PERM_ID'] = getExperimentIPadId(experiment, dictionaryType)
-		dictionary['CATEGORY'] = ' Experiment (' + experiment.getExperimentType() + ')'
+		dictionary['CATEGORY'] = 'Experiment (' + experiment.getExperimentType() + ')'
 		dictionary['SUMMARY_HEADER'] = experiment.getExperimentIdentifier()
 		dictionary['SUMMARY'] = None
 		dictionary['IDENTIFIER'] = 'Experiment'
@@ -159,14 +159,7 @@ def createSampleDictionaries(samples, dictionaryType):
 	for sample in samples:
 		dictionary = {}
 		dictionary['PERM_ID'] = getSampleIPadId(sample, dictionaryType)
-		
-		if dictionaryType == DRILL_SAMPLE_PARENT:
-			dictionary['CATEGORY'] = 'Parent (' + sample.getSampleType() + ')'
-		elif dictionaryType == DRILL_SAMPLE_CHILD:
-			dictionary['CATEGORY'] = 'Child (' + sample.getSampleType() + ')'
-		else:
-			dictionary['CATEGORY'] = 'Sample (' + sample.getSampleType() + ')'
-
+		dictionary['CATEGORY'] = 'Sample (' + sample.getSampleType() + ')'
 		dictionary['SUMMARY_HEADER'] = sample.getSampleIdentifier()
 		dictionary['SUMMARY'] = None
 		dictionary['IDENTIFIER'] = 'Sample'
-- 
GitLab