diff --git a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/DataSetForm/widgets/AdvancedEntitySearchDropdown.js b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/DataSetForm/widgets/AdvancedEntitySearchDropdown.js index 69354ac89bf3148a15abf2c1a87c363a46a0dc50..9d79a2a935555c3ab43db54d5852d79b0e12686c 100644 --- a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/DataSetForm/widgets/AdvancedEntitySearchDropdown.js +++ b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/DataSetForm/widgets/AdvancedEntitySearchDropdown.js @@ -164,6 +164,9 @@ function AdvancedEntitySearchDropdown(isMultiple, if(entity.identifier && entity.identifier.identifier) { text = entity.identifier.identifier; } + if(!entity.identifier && entity.code) { + text = Util.getDisplayNameFromCode(entity.code); + } if(profile.propertyReplacingCode && entity.properties && entity.properties[profile.propertyReplacingCode]) { text += " (" + entity.properties[profile.propertyReplacingCode] + ")"; } @@ -235,7 +238,19 @@ function AdvancedEntitySearchDropdown(isMultiple, withSampleProperties : true, withExperimentProperties : true }, function(results) { results.type = "DataSets"; action(results) }); - } + }; + + var searchSpace = function (action) { + var criteria = { + entityKind: "SPACE", + logicalOperator: "OR", + rules: { + "UUIDv4-1": { type: "Property/Attribute", name: "ATTR.CODE", operator: "thatContains", value: storedParams.data.q } + } + }; + mainController.serverFacade.searchForSpacesAdvanced(criteria, { + }, function(results) { results.type = "Spaces"; action(results); }); + }; // // Build Select @@ -314,6 +329,9 @@ function AdvancedEntitySearchDropdown(isMultiple, if(selectsDatasets) { searches.push(searchDataset); } + if (selectSpaces) { + searches.push(searchSpace) + } var action = null; action = function(result) {