details:   https://code.openbravo.com/erp/devel/pi/rev/6a60136ef23f
changeset: 21106:6a60136ef23f
user:      Shankar Balachandran <shankar.balachandran <at> openbravo.com>
date:      Tue Sep 10 16:10:38 2013 +0530
summary:   Fixes Issue 0024726: Problems with Selectors if you migrate from 
Openbravo 2.22

Certain ID fields are of length 7 in mp2.2, so when using such fields, in 
selectors, when the whole text is typed, the text is getting replaced with the 
ID.
Updated OB.Utilities.isUUID method to add support for 7 digit ID fields.

diffstat:

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

diffs (19 lines):

diff -r 3d8d31130f98 -r 6a60136ef23f 
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
        Sun Sep 08 13:00:39 2013 +0530
+++ 
b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/utilities/ob-utilities.js
        Tue Sep 10 16:10:38 2013 +0530
@@ -1031,9 +1031,14 @@
   if (typeof object !== 'string') {
     return false;
   }
-  if (object.length !== 32) {
+  if (object.length !== 7 && 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);
+  }
   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