From e1831871c44901e7c72a7fa321a2aeed902d6c20 Mon Sep 17 00:00:00 2001
From: Juan Fuentes <juanf@bs-mbpr465.d.ethz.ch>
Date: Wed, 11 Aug 2021 16:11:20 +0200
Subject: [PATCH] SSDM-11348 : Bugfix on special requests for orders and
 organization units

---
 .../html/js/views/SampleForm/widgets/LinksView.js        | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/SampleForm/widgets/LinksView.js b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/SampleForm/widgets/LinksView.js
index d045679f3f8..85529692484 100644
--- a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/SampleForm/widgets/LinksView.js
+++ b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/SampleForm/widgets/LinksView.js
@@ -465,14 +465,13 @@ function LinksView(linksController, linksModel) {
                     }
                 }
         		if(sampleTypeCode === "REQUEST") {
-        			// This property is missing the $ because the search uses V1 instead of V3
-        			advancedSampleSearchCriteria.subCriteria.rules["1-3"] = { type : "Property", name : "PROP.$ORDERING.ORDER_STATUS", value : "NOT_YET_ORDERED" };
-        			advancedSampleSearchCriteria.subCriteria.rules["2-3"] = { type : "Property", name : "PROP.$ORDERING.ORDER_STATUS", value : "NOT_YET_ORDERED" };
+        			advancedSampleSearchCriteria.subCriteria["1"].rules["1-3"] = { type : "Property/Attribute", name : "PROP.$ORDERING.ORDER_STATUS", operator : "thatEqualsString", value : "NOT_YET_ORDERED" };
+        			advancedSampleSearchCriteria.subCriteria["2"].rules["2-3"] = { type : "Property/Attribute", name : "PROP.$ORDERING.ORDER_STATUS", operator : "thatEqualsString", value : "NOT_YET_ORDERED" };
         		}
         		if(sampleTypeCode === "ORGANIZATION_UNIT") {
         			var spaceCode = mainController.currentView._sampleFormModel.sample.spaceCode;
-        			advancedSampleSearchCriteria.subCriteria.rules["1-3"] = { type : "Attribute", name : "ATTR.SPACE", value : spaceCode };
-        			advancedSampleSearchCriteria.subCriteria.rules["2-3"] = { type : "Attribute", name : "ATTR.SPACE", value : spaceCode };
+        			advancedSampleSearchCriteria.subCriteria["1"].rules["1-3"] = { type : "Property/Attribute", name : "ATTR.SPACE", value : spaceCode };
+        			advancedSampleSearchCriteria.subCriteria["2"].rules["2-3"] = { type : "Property/Attribute", name : "ATTR.SPACE", value : spaceCode };
         		}
                 return advancedSampleSearchCriteria;
             });
-- 
GitLab