Skip to content
Snippets Groups Projects
Commit 6d75a9bb authored by parkera's avatar parkera
Browse files

SSDM-2161 ELN: change the way codes are automatically generated

Small fix - don't assume that all codes are 3 characters long and take the length of the prefix, adding the numeric code at the end

SVN: 34370
parent a3ce3947
No related branches found
No related tags found
No related merge requests found
...@@ -278,7 +278,7 @@ function ServerFacade(openbisServer) { ...@@ -278,7 +278,7 @@ function ServerFacade(openbisServer) {
else{ else{
var codes = []; var codes = [];
for(var idx=0; idx<results.length; idx++){ for(var idx=0; idx<results.length; idx++){
numeric_code = results[idx].code.substring(3); //assuming all codes are 3 letters long!!!! numeric_code = results[idx].code.substring(prefix.length);
numeric_code = numeric_code.replace("_",""); numeric_code = numeric_code.replace("_","");
codes[idx] = parseInt(numeric_code); codes[idx] = parseInt(numeric_code);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment