From a949b64e2e059e76444347f01ff90bc1c7502522 Mon Sep 17 00:00:00 2001
From: "Fuentes Serna  Juan Mariano (ID SIS)" <juanf@bs-mbpr28.d.ethz.ch>
Date: Thu, 8 Feb 2018 15:07:09 +0100
Subject: [PATCH] SSDM-6016 : ELN Storage - storage position form should show
 storage link as name

---
 .../html/js/views/SampleForm/SampleFormView.js       | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/SampleForm/SampleFormView.js b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/SampleForm/SampleFormView.js
index 68e9fc8b2e7..8015b21bb22 100644
--- a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/SampleForm/SampleFormView.js
+++ b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/SampleForm/SampleFormView.js
@@ -76,6 +76,18 @@ function SampleFormView(sampleFormController, sampleFormModel) {
 		var nameLabel = this._sampleFormModel.sample.properties[profile.propertyReplacingCode];
 		if(nameLabel) {
 			nameLabel = html.sanitize(nameLabel);
+		} else if(this._sampleFormModel.sample.sampleTypeCode === "STORAGE_POSITION") {
+			var properties = this._sampleFormModel.sample.properties;
+			var storagePropertyGroup = profile.getStoragePropertyGroup();
+			var boxProperty = properties[storagePropertyGroup.boxProperty];
+			if(!boxProperty) {
+				boxProperty = "NoBox";
+			}
+			var positionProperty = properties[storagePropertyGroup.positionProperty];
+			if(!positionProperty) {
+				positionProperty = "NoPos";
+			}
+			nameLabel = boxProperty + " : " + positionProperty;
 		} else {
 			nameLabel = this._sampleFormModel.sample.code;
 		}
-- 
GitLab