From 81a1f37a17fa32f0e5cd2ec12081a2cfc03d4f91 Mon Sep 17 00:00:00 2001
From: juanf <juanf>
Date: Tue, 22 Aug 2017 16:00:07 +0000
Subject: [PATCH] SSDM-5506 : Bugfix, normal codes don't get influenced by
 clone codes anymore

SVN: 38642
---
 .../1/as/webapps/eln-lims/html/js/server/ServerFacade.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/server/ServerFacade.js b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/server/ServerFacade.js
index 9b942f6316d..dc018e24263 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
@@ -378,12 +378,11 @@ function ServerFacade(openbisServer) {
 					} else{
 						var codes = [];
 						for(var idx=0; idx<results.length; idx++){
-							numeric_code = results[idx].code.substring(prefix.length);							
-							numeric_code = numeric_code.replace("_","");
+							numeric_code = results[idx].code.substring(prefix.length);
 							numeric_code = parseInt(numeric_code);
-							if(isNaN(numeric_code))
-								numeric_code = 1;
-							codes[idx] = numeric_code; 
+							if(!isNaN(numeric_code)) {
+								codes.push(numeric_code); 
+							}
 						}
 						codes = codes.sort(function (a, b) { 
 						    return a - b;
-- 
GitLab