diff --git a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/server/ServerFacade.js b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/server/ServerFacade.js index 45c27d4ea9cb72ad174c1c86078c0d0afd63988e..e0563d6e71053513a6948f9ac7d94f166f2946ee 100644 --- a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/server/ServerFacade.js +++ b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/server/ServerFacade.js @@ -1550,6 +1550,13 @@ function ServerFacade(openbisServer) { value : searchCriteria.criteria[cIdx].fieldValue.value }); } + + if(searchCriteria.criteria[cIdx].fieldType === "ATTRIBUTE" && searchCriteria.criteria[cIdx].fieldName === "perm id" && + searchCriteria.criteria[cIdx].fieldValue.__proto__["@type"] === "as.dto.common.search.StringEqualToValue") { + hackFixForBrokenEquals.push({ + permId : searchCriteria.criteria[cIdx].fieldValue.value + }); + } } } // @@ -1585,9 +1592,14 @@ function ServerFacade(openbisServer) { for(var rIdx = 0; rIdx < results.length; rIdx++) { var result = results[rIdx]; for(var fIdx = 0; fIdx < hackFixForBrokenEquals.length; fIdx++) { - if( result && - result.properties && - result.properties[hackFixForBrokenEquals[fIdx].propertyCode] === hackFixForBrokenEquals[fIdx].value) { + var propertyFound = hackFixForBrokenEquals[fIdx].propertyCode && result && + result.properties && + result.properties[hackFixForBrokenEquals[fIdx].propertyCode] === hackFixForBrokenEquals[fIdx].value; + + var permIdFound = hackFixForBrokenEquals[fIdx].permId && result && + result.permId && result.permId.permId + result.permId.permId === hackFixForBrokenEquals[fIdx].value; + if(propertyFound || permIdFound) { switch(operator) { case "AND": resultsValid[rIdx] = resultsValid[rIdx] && true; @@ -1963,6 +1975,14 @@ function ServerFacade(openbisServer) { value : sampleCriteria.matchClauses[cIdx].desiredValue.substring(1,sampleCriteria.matchClauses[cIdx].desiredValue.length-1) }); } +// TODO : This could be supported as done on V3 but is untested, so is commented out in case is buggy +// if(sampleCriteria.matchClauses[cIdx]["@type"] === "AttributeMatchClause" && +// sampleCriteria.matchClauses[cIdx]["attribute"] === "PERM_ID" && +// sampleCriteria.matchClauses[cIdx]["compareMode"] === "EQUALS") { +// hackFixForBrokenEquals.push({ +// permId : sampleCriteria.matchClauses[cIdx].desiredValue.substring(1,sampleCriteria.matchClauses[cIdx].desiredValue.length-1) +// }); +// } } } //