allow dot (.) as part of UUIDs
authorAsier Lostalé <asier.lostale@openbravo.com>
Thu, 16 Mar 2017 08:47:42 +0100
changeset 31454 542e2ea80324
parent 31453 0893eb4f4a85
child 32047 a9dbec18faa5
allow dot (.) as part of UUIDs

This is a BUT specific transitory patch to allow IDs created during initial data
load. It should be removed once these IDs are fixed in DB.
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/utilities/ob-utilities.js
src-core/src/org/openbravo/base/filter/IsIDFilter.java
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/utilities/ob-utilities.js	Tue Mar 07 12:36:31 2017 +0100
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/utilities/ob-utilities.js	Thu Mar 16 08:47:42 2017 +0100
@@ -1055,7 +1055,7 @@
     return false;
   }
   if (object.length === 32) {
-    return (/[A-Fa-f0-9]{32,32}/).test(object);
+    return (/[A-Fa-f0-9\.]{32,32}/).test(object);
   } else if (object.length <= 10) {
     //return true if uuid contains only numbers
     return (/^\d+$/).test(object);
--- a/src-core/src/org/openbravo/base/filter/IsIDFilter.java	Tue Mar 07 12:36:31 2017 +0100
+++ b/src-core/src/org/openbravo/base/filter/IsIDFilter.java	Thu Mar 16 08:47:42 2017 +0100
@@ -22,7 +22,7 @@
   public final static IsIDFilter instance = new IsIDFilter();
 
   public IsIDFilter() {
-    super("[a-fA-F0-9]*");
+    super("[a-fA-F0-9\\.]*");
   }
 
 }