Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0031219Openbravo ERPA. Platformpublic2015-10-22 11:382015-10-27 10:37
AugustoMauch 
alostale 
immediateminorhave not tried
closedfixed 
5
 
3.0PR15Q3.33.0PR15Q3.3 
AugustoMauch
Core
3.0PR15Q1
No
0031219: 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.0PR15Q3.2
2015-10-22 15:37alostaleReview Assigned To => AugustoMauch
2015-10-22 15:38alostaleAssigned Toplatform => alostale
2015-10-22 15:57alostaleTarget Version3.0PR15Q3.2 => 3.0PR15Q3.3
2015-10-27 09:21hgbotCheckin
2015-10-27 09:21hgbotNote Added: 0081328
2015-10-27 09:21hgbotStatusscheduled => resolved
2015-10-27 09:21hgbotResolutionopen => fixed
2015-10-27 09:21hgbotFixed in SCM revision => http://code.openbravo.com/erp/backports/3.0PR15Q3.3/rev/8d4f05a45cb53b71bc4ac7268382ab4abf08b32d [^]
2015-10-27 10:37AugustoMauchNote Added: 0081340
2015-10-27 10:37AugustoMauchStatusresolved => closed
2015-10-27 10:37AugustoMauchFixed in Version => 3.0PR15Q3.3

Notes
(0081328)
hgbot   
2015-10-27 09:21   
Repository: erp/backports/3.0PR15Q3.3
Changeset: 8d4f05a45cb53b71bc4ac7268382ab4abf08b32d
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.0PR15Q3.3/rev/8d4f05a45cb53b71bc4ac7268382ab4abf08b32d [^]

fixed bug 31219: 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
---
(0081340)
AugustoMauch   
2015-10-27 10:37   
Code reviewed and verified in [1]@bcb35511b17d

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