Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0024662Openbravo ERPA. Platformpublic2013-09-02 13:382013-10-18 12:55
egoitz 
alostale 
urgentmajorhave not tried
closedfixed 
5
 
3.0MP293.0MP29 
AugustoMauch
Core
No
0024662: When selecting a row on a pickandExecute a query to get the data selected is done
When selecting a row on a pickandExecute a query to get the data selected is done.The select is not needed because you already have the data on the grid.
-Activate the log of postgresql to show queries that take more than 10ms
-Open the REturn from customer window
-Create a new row and save
-click on the pick and execute button
-The grid is shown
*See on the log the query executed
-Then select one row
*See on the log that a similar query filtered by the row selected is done

This happens becuase the request is done with action NEW but also including the rowId.
Performance
diff issue-24662.diff (1,009) 2013-09-26 16:08
https://issues.openbravo.com/file_download.php?file_id=6431&type=bug
Issue History
2013-09-02 13:38egoitzNew Issue
2013-09-02 13:38egoitzAssigned To => AugustoMauch
2013-09-02 13:38egoitzModules => Core
2013-09-02 13:38egoitzTriggers an Emergency Pack => No
2013-09-02 13:38egoitzTag Attached: Performance
2013-09-03 11:10egoitzTarget Version => 3.0MP28
2013-09-23 06:55shankarbAssigned ToAugustoMauch => shankarb
2013-09-25 13:30alostaleAssigned Toshankarb => alostale
2013-09-26 16:02alostaleNote Added: 0061419
2013-09-26 16:08alostaleFile Added: issue-24662.diff
2013-09-26 16:08alostaleNote Added: 0061422
2013-09-26 16:08alostaleStatusnew => scheduled
2013-09-26 16:08alostaleTarget Version3.0MP28 => 3.0MP29
2013-09-30 12:00alostaleReview Assigned To => shankarb
2013-10-16 17:40shankarbReview Assigned Toshankarb => AugustoMauch
2013-10-16 17:40shankarbIssue Monitored: AugustoMauch
2013-10-16 17:42hgbotCheckin
2013-10-16 17:42hgbotNote Added: 0061720
2013-10-16 17:42hgbotStatusscheduled => resolved
2013-10-16 17:42hgbotResolutionopen => fixed
2013-10-16 17:42hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/77b44aa868e8e9b6ca315d62e8ef69c7c8465203 [^]
2013-10-17 18:21hudsonbotCheckin
2013-10-17 18:21hudsonbotNote Added: 0061777
2013-10-18 12:55AugustoMauchNote Added: 0061802
2013-10-18 12:55AugustoMauchStatusresolved => closed
2013-10-18 12:55AugustoMauchFixed in Version => 3.0MP29

Notes
(0061419)
alostale   
2013-09-26 16:02   
When a row is selected FIC is called in NEW mode, this is correct and it is done to calculate defaults, callouts, combos, etc. In this case record id is passed as parameter and used to retrieve current element, for which we already have information in the client side.

In general retrieving current record by ID shouldn't be expensive, but in this case datasource is based in a view which has a perfomance impact.

Attached patch does not send id so FIC doesn't queries for current value.
(0061422)
alostale   
2013-09-26 16:08   
Attached patch for this issue, push scheduled for mp29
(0061720)
hgbot   
2013-10-16 17:42   
Repository: erp/devel/pi
Changeset: 77b44aa868e8e9b6ca315d62e8ef69c7c8465203
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Wed Oct 16 21:11:45 2013 +0530
URL: http://code.openbravo.com/erp/devel/pi/rev/77b44aa868e8e9b6ca315d62e8ef69c7c8465203 [^]

Fixes Issue 0024662: When selecting a row on a pickandExecute a query to get the data selected is done

---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/process/ob-pick-and-execute-grid.js
---
(0061777)
hudsonbot   
2013-10-17 18:21   
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/121b38a3673a [^]

Maturity status: Test
(0061802)
AugustoMauch   
2013-10-18 12:55   
Code reviewed and verified in pi@eb0f3ecbdae4