Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0028220Openbravo ERPA. Platformpublic2014-11-18 18:352014-12-30 23:25
AugustoMauch 
AugustoMauch 
immediatemajorhave not tried
closedfixed 
5
 
3.0PR15Q1 
alostale
Core
No
0028220: If lazy filtering is configure in a subtab, filtering by one of its foreign keys does not apply selected parent filter
If a subtab is configured to use lazy filtering, when the dropdown of one of its foreign key filters is opened the datasource request is done without filtering by the record selected in the parent tab.

This results in a datasource request that performs very badly.
- Login as System Administrator-
- Open the Grid Configuration at System Level window
- Create a new record, check Lazy Filtering on Grid
- Open the Window, Tabs and Fields window
- Press enter in the header filter editor to load the records
- Select any record
- In the Tab subtab, open the dropdown filter of the Table column. Check that is loaded not only with the tables used in this window, but with all the tables defined in ad_table.
Performance
caused by feature request 0028284 closed AugustoMauch Grid Configuration for High Volume Windows 
related to defect 0028229 closed AugustoMauch Error in Pick and Execute windows when using Lazy Filtering 
Issue History
2014-11-18 18:35AugustoMauchNew Issue
2014-11-18 18:35AugustoMauchAssigned To => AugustoMauch
2014-11-18 18:35AugustoMauchModules => Core
2014-11-18 18:35AugustoMauchTriggers an Emergency Pack => No
2014-11-18 18:35AugustoMauchTag Attached: Performance
2014-11-18 18:44AugustoMauchIssue Monitored: alostale
2014-11-18 18:44AugustoMauchReview Assigned To => alostale
2014-11-18 18:46hgbotCheckin
2014-11-18 18:46hgbotNote Added: 0071793
2014-11-18 18:46hgbotStatusnew => resolved
2014-11-18 18:46hgbotResolutionopen => fixed
2014-11-18 18:46hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/78de53e9fc7253115774a818f3cce620f2589d41 [^]
2014-11-19 09:07alostaleNote Added: 0071800
2014-11-19 09:07alostaleStatusresolved => closed
2014-11-19 09:07alostaleFixed in Version => 3.0PR15Q1
2014-11-19 18:02AugustoMauchRelationship addedrelated to 0028229
2014-11-26 08:04alostaleRelationship addedcaused by 0028284
2014-12-30 23:25hudsonbotCheckin
2014-12-30 23:25hudsonbotNote Added: 0073079

Notes
(0071793)
hgbot   
2014-11-18 18:46   
Repository: erp/devel/pi
Changeset: 78de53e9fc7253115774a818f3cce620f2589d41
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Tue Nov 18 18:43:55 2014 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/78de53e9fc7253115774a818f3cce620f2589d41 [^]

Fixes bug 28220:FK no longer filtered without applying selected parent criteria

The problem was the following. If a tab was configured to use lazy filtering, when one of its foreign keys is filtered the criteria is obtained from the current values of the filter editor, instead of directly calling the getCriteria function of the grid.

The problem is that the criteria was not being passed to the OBViewGrid.convertCriteria function, which among other things adds the criteria to filter by the record selected in the parent tab. The result was that the dropdown contained way more records than it should, and that the query to retrieve the records could have very bad performance if the table associated with the tab contained many records.

---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-fk-filter.js
---
(0071800)
alostale   
2014-11-19 09:07   
Code reviewed.

Tested:
-Having lazy filtering:
 * FK drop downs in subtabs filter correctly by its parent
 * they apply correctly additional criterias
 * filtering in parent tabs works correctly
-Without lazy filtering FK drops downs are not affected
(0073079)
hudsonbot   
2014-12-30 23:25   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/6525fe229e06 [^]
Maturity status: Test