details:   https://code.openbravo.com/erp/devel/pi/rev/dd0f6674c851
changeset: 21112:dd0f6674c851
user:      Shankar Balachandran <shankar.balachandran <at> openbravo.com>
date:      Wed Sep 11 23:50:28 2013 +0530
summary:   Fixes Issue 0024726: Problems with Selectors if you migrate from 
Openbravo 2.22

In the fix for the issue 20352 [1], the condition to replace the numbers only 
if its a 32 characters UUID was introduced.
But there are ID's in the system that is upto 10 characters, but all numbers. 
So it does not replace the numbers for these cases,
so instead of the text, the ID's were shown. Now added condition to check the 
following:
1. uuid's length should be less than 10 or equal to 32.
2. If uuid's length is less than 10, it should contain only numeric values

[1] 
https://code.openbravo.com/erp/devel/pi/rev/0a1670b979e2c0d42e97e8c8b045b4a760df9a28

diffstat:

 
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/utilities/ob-utilities.js
 |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (21 lines):

diff -r 290c9b12a211 -r dd0f6674c851 
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/utilities/ob-utilities.js
--- 
a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/utilities/ob-utilities.js
        Wed Sep 11 11:03:58 2013 +0200
+++ 
b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/utilities/ob-utilities.js
        Wed Sep 11 23:50:28 2013 +0530
@@ -1031,13 +1031,14 @@
   if (typeof object !== 'string') {
     return false;
   }
-  if (object.length !== 7 && object.length !== 32) {
+  if (object.length > 10 && object.length !== 32) {
     return false;
   }
   if (object.length === 32) {
     return (/[A-Fa-f0-9]{32,32}/).test(object);
-  } else if (object.length === 7) {
-    return (/[A-Fa-f0-9]{7,7}/).test(object);
+  } else if (object.length <= 10) {
+    //return true if uuid contains only numbers
+    return (/^\d+$/).test(object);
   }
   return (/[A-Fa-f0-9]{32,32}/).test(object);
 };

------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. Consolidate legacy IT systems to a single system of record for IT
2. Standardize and globalize service processes across IT
3. Implement zero-touch automation to replace manual, redundant tasks
http://pubads.g.doubleclick.net/gampad/clk?id=51271111&iu=/4140/ostg.clktrk
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to