Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0031218Openbravo ERPA. Platformpublic2015-10-22 11:382015-10-23 09:23
AugustoMauch 
alostale 
immediateminorhave not tried
closedfixed 
5
 
3.0PR15Q43.0PR15Q4 
AugustoMauch
Core
3.0PR15Q1
No
0031218: Strange behaviour when refreshing a grid after filtering a product characteristic column
If the user filters a tab using a product characteristic column and then adds any other filter, the next time the grid is reloaded it be very slow.
== Prepare the data ==
As F&B Admin:
- Open the Product Characteristic window. Create one variant characteristic.
- In its Value subtab, create a record.
- Open the Product window. Create a new variant product.
- Add in its Characteristics subtab the characteristic you created in the previous step.
- Execute the Create Variants record and refresh the grid. Check that a new product has been created

== Actual Test ==
- In the product window, use the product characteristic filter to show only the records that have the characteristic you defined. This will work properly
- Click the refresh toolbar button. This will work properly
- Add any other filter (for instance, Active=Yes) and refresh the grid again. The tab will show the Loading Data message, but it will not actually load the data.

Note that if the filters are added in the reverse order (first any other than the product characteristic filter, then the product characteristic filter), it works fine.
No tags attached.
blocks defect 0031214 closed alostale Strange behaviour when refreshing a grid after filtering a product characteristic column 
Issue History
2015-10-22 15:18alostaleTypedefect => backport
2015-10-22 15:18alostaleTarget Version => 3.0PR15Q4
2015-10-22 15:37alostaleReview Assigned To => AugustoMauch
2015-10-22 15:37alostaleAssigned Toplatform => alostale
2015-10-22 15:47hgbotCheckin
2015-10-22 15:47hgbotNote Added: 0081224
2015-10-22 15:47hgbotStatusscheduled => resolved
2015-10-22 15:47hgbotResolutionopen => fixed
2015-10-22 15:47hgbotFixed in SCM revision => http://code.openbravo.com/erp/backports/3.0PR15Q4/rev/ffd7eaef5ba051235481bc4352e1aaded47d30ae [^]
2015-10-23 09:23AugustoMauchNote Added: 0081245
2015-10-23 09:23AugustoMauchStatusresolved => closed
2015-10-23 09:23AugustoMauchFixed in Version => 3.0PR15Q4

Notes
(0081224)
hgbot   
2015-10-22 15:47   
Repository: erp/backports/3.0PR15Q4
Changeset: ffd7eaef5ba051235481bc4352e1aaded47d30ae
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Thu Oct 22 15:26:37 2015 +0200
URL: http://code.openbravo.com/erp/backports/3.0PR15Q4/rev/ffd7eaef5ba051235481bc4352e1aaded47d30ae [^]

fixed bug 31218: adding extra filter after product characteristics fails

  When product characteristics was filtered returning less than 100 records, and
  on top of that criteria a new one in another field was added, it was not possible
  to refresh the grid anymore.

  When this additional criteria was set, a javascript exception was thrown because
  adaptive filtering was tried to be evaluated for 'exists' search operator. This
  operator didn't implement condition funtion which was invoked causing the exception.
  This exception left the grid in an inconsistent estate which made not posible to
  refresh it.

  To fix it, 'condition' function has been implemented for 'exists' search operator,
  as this operator can't be evaluted in client side, we can ensure all fields in
  grid fulfill any criteria defined by it, so the implementation can return always
  true.

---
M modules/org.openbravo.userinterface.smartclient/web/org.openbravo.userinterface.smartclient/js/ob-smartclient.js
---
(0081245)
AugustoMauch   
2015-10-23 09:23   
Code reviewed and verified in [1]@ffd7eaef5ba0

[1] https://code.openbravo.com/erp/backports/3.0PR15Q4 [^]