Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0016611Openbravo ERPI. Performancepublic2011-04-01 16:262011-05-26 07:44
shuehner 
mtaal 
urgentmajorhave not tried
closedfixed 
5
 
3.0RC7 
Core
No
0016611: Initial request done by UI selector element in form view does not use any filters or paging
Note that this missing filters to immediately make completely unusable if the db contains i.e. 100k products contained in a pricelist. (As described in issue 16373).

The rewrite the datasource to use the AdvancedCriteria format seems to have lost the use of simple parameters named like a property-path.

Additionally the ob-selecotor-item.js code does contain a switch to AdvancedCriteria in some picklist methods, however that code seems to be not used in the initial request, as at least no _constructor:AdvancedCriteria parameter is present in the requests.
Open Product window select first product
select 'Price' child tab
change to edit view
Notice that the datasource request for the selector for the 'Product' field is doing a db-query without any filter or limit.
Notice that the corresponding http-request does have an 'product.id=UUID' parameter which is not used in the query.

Compare same scenario with rc4 and notice that there the product.id parameter is correctly used and embedded into the query.

---
Second scneario.
Sales Order line (product selector)
When creating a new sales order line in newInForm mode then on open the product selector does an datasource request which also leads to an db-query without filter or limit. Notice that the request-parameters contain a parameter 'product.id' without value.
No tags attached.
related to defect 00166213.0RC7 closed mtaal Selector item does an unnecessary count operation on server 
depends on defect 0016622 closed alostale ReadOnlyDataSourceService doesn't honour the prevent count parameter 
depends on defect 00166233.0MP1 closed alostale CustomQuerySelectorDatasource is very inefficient when filtering using a foreign key reference 
related to defect 00163733.0MP1 closed gorkaion Product selector & grid not usable when system has large number of products active 
related to defect 00174653.0MP0 closed iperdomo The combo to select a partner does not work after save a record on sales order window. 
patch 16611_customquery.patch (1,653) 2011-04-03 14:03
https://issues.openbravo.com/file_download.php?file_id=3822&type=bug
patch 16611_customquery_v2.patch (3,680) 2011-04-06 03:10
https://issues.openbravo.com/file_download.php?file_id=3839&type=bug
patch 16611_jsonservice.patch (1,989) 2011-04-15 08:24
https://issues.openbravo.com/file_download.php?file_id=3883&type=bug
Issue History
2011-04-01 16:26shuehnerNew Issue
2011-04-01 16:26shuehnerAssigned To => shuehner
2011-04-01 16:26shuehnerModules => Core
2011-04-01 16:28shuehnerRelationship addedrelated to 0016373
2011-04-01 16:51eintelauIssue Monitored: eintelau
2011-04-03 14:03eintelauNote Added: 0035497
2011-04-03 14:03eintelauFile Added: 16611_customquery.patch
2011-04-05 12:43shuehnerNote Added: 0035596
2011-04-05 12:43shuehnerTarget Version3.0RC6 => 3.0RC7
2011-04-05 13:53iperdomoPriorityimmediate => urgent
2011-04-05 17:19shuehnerAssigned Toshuehner => mtaal
2011-04-05 17:19shuehnerRelationship addedrelated to 0016621
2011-04-05 17:19shuehnerRelationship addeddepends on 0016622
2011-04-05 17:19shuehnerRelationship addeddepends on 0016623
2011-04-05 17:20shuehnerNote Added: 0035624
2011-04-06 03:10eintelauNote Added: 0035634
2011-04-06 03:10eintelauFile Added: 16611_customquery_v2.patch
2011-04-11 10:07alostaleStatusnew => scheduled
2011-04-11 10:07alostalefix_in_branch => pi
2011-04-11 15:39mtaalAssigned Tomtaal => alostale
2011-04-15 08:24eintelauNote Added: 0035964
2011-04-15 08:24eintelauFile Added: 16611_jsonservice.patch
2011-04-15 11:22alostaleAssigned Toalostale => iperdomo
2011-05-06 19:38dmitry_mezentsevAssigned Toiperdomo => alostale
2011-05-09 13:31alostaleAssigned Toalostale => mtaal
2011-05-12 14:58hgbotCheckin
2011-05-12 14:58hgbotNote Added: 0036896
2011-05-12 14:58hgbotStatusscheduled => resolved
2011-05-12 14:58hgbotResolutionopen => fixed
2011-05-12 14:58hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/1b57600d569190c29fb3e726f1aa86b7c06a0d94 [^]
2011-05-12 15:47hgbotCheckin
2011-05-12 15:47hgbotNote Added: 0036900
2011-05-13 06:23hudsonbotCheckin
2011-05-13 06:23hudsonbotNote Added: 0036937
2011-05-13 06:23hudsonbotCheckin
2011-05-13 06:23hudsonbotNote Added: 0036940
2011-05-16 14:58shuehnerNote Added: 0037027
2011-05-16 14:58shuehnerStatusresolved => new
2011-05-16 14:58shuehnerResolutionfixed => open
2011-05-16 16:13shuehnerNote Added: 0037029
2011-05-17 09:50hgbotCheckin
2011-05-17 09:50hgbotNote Added: 0037051
2011-05-17 09:50hgbotStatusnew => resolved
2011-05-17 09:50hgbotResolutionopen => fixed
2011-05-17 09:50hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/devel/pi/rev/1b57600d569190c29fb3e726f1aa86b7c06a0d94 [^] => http://code.openbravo.com/erp/devel/pi/rev/0bb5ac454ee19bac63d045ab4e047f4dd2bc7532 [^]
2011-05-17 15:55shuehnerNote Added: 0037085
2011-05-17 15:55shuehnerStatusresolved => closed
2011-05-26 07:44hudsonbotCheckin
2011-05-26 07:44hudsonbotNote Added: 0037464
2011-06-02 19:26iperdomoRelationship addedrelated to 0017465

Notes
(0035497)
eintelau   
2011-04-03 14:03   
I have attached a partial fix for this issue that fixes the problem when using the selector is defined using a custom HQL query. This fix relies on the fix attached to issue 16623.
(0035596)
shuehner   
2011-04-05 12:43   
->rc7 as rc6 freezing today and full fix will not be ready today.
(0035624)
shuehner   
2011-04-05 17:20   
Marking as related with all the other known bugs about datasource/filtering/performance
(0035634)
eintelau   
2011-04-06 03:10   
After investigating further there is one additional change needed to make a custom selector able to filter by the current value.

To add any field to the where clause it needs to have "Clause Left Part" defined so that the custom query selector can generate the HQL. This means the field used as the selector value needs to have the left clause part, even if it is not in the grid view

Additional changes in updated patch
- Change display logic of Clause Left Part field to be displayed for all fields when using custom logic (instead of just fields that are in grid)
- Add clause left part for business partner selector identifier field
(0035964)
eintelau   
2011-04-15 08:24   
I have attached another patch that fixes the issue for selectors using standard json data source. This patch addresses the two scenarios described in the steps to reproduce above
(0036896)
hgbot   
2011-05-12 14:58   
Repository: erp/devel/pi
Changeset: 1b57600d569190c29fb3e726f1aa86b7c06a0d94
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Thu May 12 14:57:37 2011 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/1b57600d569190c29fb3e726f1aa86b7c06a0d94 [^]

Fixes issue 16611: Initial request done by UI selector element in form view does not use any filters or paging

---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-view-form.js
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-view-grid.js
M modules/org.openbravo.userinterface.selector/web/org.openbravo.userinterface.selector/js/ob-selector-item.js
---
(0036900)
hgbot   
2011-05-12 15:47   
Repository: erp/devel/pi
Changeset: 184bd464aefe4b0e0c3f658fc9d4fad4e74c319b
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Thu May 12 15:46:50 2011 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/184bd464aefe4b0e0c3f658fc9d4fad4e74c319b [^]

Related to issue 16611: Initial request done by UI selector element in form view does not use any filters or paging

---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-view-grid.js
M modules/org.openbravo.userinterface.selector/web/org.openbravo.userinterface.selector/js/ob-selector-item.js
---
(0036937)
hudsonbot   
2011-05-13 06:23   
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/d221ad9e329e [^]

Maturity status: Test
(0036940)
hudsonbot   
2011-05-13 06:23   
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/d221ad9e329e [^]

Maturity status: Test
(0037027)
shuehner   
2011-05-16 14:58   
Re-opened, as same requests with limit are still (or again) happening as described in the bug-report.
(0037029)
shuehner   
2011-05-16 16:13   
Note: when waiting for the slow coombo-query to finish, then opening the selector grid...

Then some data is displayed directly
but the two applied filter are not rendered in the filter area
in background 2* the same request without limit is fired
after waiting for those to also finish the filter is rendered and used
(0037051)
hgbot   
2011-05-17 09:50   
Repository: erp/devel/pi
Changeset: 0bb5ac454ee19bac63d045ab4e047f4dd2bc7532
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Tue May 17 09:48:59 2011 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/0bb5ac454ee19bac63d045ab4e047f4dd2bc7532 [^]

Fixes issue 16611: Initial request done by UI selector element in form view does not use any filters or paging

---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-grid.js
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-view-form.js
M modules/org.openbravo.userinterface.selector/web/org.openbravo.userinterface.selector/js/ob-selector-item.js
---
(0037085)
shuehner   
2011-05-17 15:55   
Tested in pi/pgsql (rev: a364fc44064e). Working fine now. When showing either new or edit in grid or edit mode a combobox for a i.e. product selector is no longer doing one request for all record in its table without any filter or limit.

Instead only a data request is fired when really using either the dropodwn of the combo or the popup of the selector. that requests is doing its normal filtering/paging as expected.
(0037464)
hudsonbot   
2011-05-26 07:44   
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/728387046be6 [^]

Maturity status: Test