Fixes ISSUE-44562: Sorts values of product characteristics alphabetically
authorCristian Berner <cristian.berner@openbravo.com>
Tue, 14 Jul 2020 14:24:01 +0200
changeset 37494 1b15032514dc
parent 37493 9be1c8b0c453
child 37495 adf4b4ee2ad5
Fixes ISSUE 44562: Sorts values of product characteristics alphabetically

Previously product characterstic values in popup filter were not sorted,
now those are sorted following alphanumeric order.
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-characteristics.js
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-characteristics.js	Tue Jul 14 17:35:52 2020 +0530
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-characteristics.js	Tue Jul 14 14:24:01 2020 +0200
@@ -11,7 +11,7 @@
  * under the License.
  * The Original Code is Openbravo ERP.
  * The Initial Developer of the Original Code is Openbravo SLU
- * All portions are Copyright (C) 2013-2019 Openbravo SLU
+ * All portions are Copyright (C) 2013-2020 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -275,6 +275,10 @@
       ) {
         this.checkInitialNodes(this.topElement.creator.internalValue);
       }
+      // Sort tree, so all values that arrived are sorted alphanumerically
+      if (this.canSort) {
+        this.sort();
+      }
     };
 
     /**