Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0035702Openbravo ERP03. Procurement managementpublic2017-04-05 13:162018-12-11 20:22
vmromanos 
nonofrancisco 
normalmajorhave not tried
closedfixed 
5
 
3.0PR19Q1 
Sandrahuguet
Core
No
0035702: Performance improvements in Purchase Order Report PDF format
1. Last "Group By" is not necessary because it's grouping exactly by the same columns as in the subquery

2. Unnecessary coalesces in mandatory columns (orderline.currency, order.dateordered)

3. Remove duplicated columns dateordered and transdate

4. Run line net amount and price actual currency conversion in outer query as it's grouping by date too

5. Run joins to get names in most outer join:
* c_bpartner: run group by using c_bpartner_id and the join at the end
* m_product: run group by m_product_id
* c_uom: group by c_uom_id and c_aum

6. The alternativeUom is calculated with a subselect, that could be replaced by a left join (related to previous point to get the name).
This issue might be difficult to reproduce, and it has been detected by a code review.
Performance
related to feature request 0033035 closed airaceburu New filters in Purchase Order Report 
Issue History
2017-04-05 13:16vmromanosNew Issue
2017-04-05 13:16vmromanosAssigned To => Triage Finance
2017-04-05 13:16vmromanosModules => Core
2017-04-05 13:16vmromanosTriggers an Emergency Pack => No
2017-04-05 13:16vmromanosRelationship addedrelated to 0033035
2017-04-05 13:16vmromanosTarget Version => 3.0PR17Q3
2017-04-06 11:50aferrazAssigned ToTriage Finance => markmm82
2017-06-12 16:53aferrazAssigned Tomarkmm82 => collazoandy4
2017-06-12 22:41collazoandy4Statusnew => scheduled
2017-06-13 10:48aferrazTarget Version3.0PR17Q3 =>
2017-10-18 15:55nonofranciscoAssigned Tocollazoandy4 => nonofrancisco
2017-10-19 16:01nonofranciscoNote Added: 0099966
2018-11-15 17:20SandrahuguetTag Attached: Performance
2018-11-19 17:29hgbotCheckin
2018-11-19 17:29hgbotNote Added: 0107990
2018-11-19 17:29hgbotStatusscheduled => resolved
2018-11-19 17:29hgbotResolutionopen => fixed
2018-11-19 17:29hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/381ee761e7393bbfe48f1297fbf76a1a6470f9d2 [^]
2018-11-19 17:29hgbotCheckin
2018-11-19 17:29hgbotNote Added: 0107991
2018-11-19 17:30SandrahuguetReview Assigned To => Sandrahuguet
2018-11-19 17:30SandrahuguetNote Added: 0107992
2018-11-19 17:30SandrahuguetStatusresolved => closed
2018-11-19 17:30SandrahuguetFixed in Version => 3.0PR19Q1
2018-12-11 20:22hudsonbotCheckin
2018-12-11 20:22hudsonbotNote Added: 0108475
2018-12-11 20:22hudsonbotCheckin
2018-12-11 20:22hudsonbotNote Added: 0108476

Notes
(0099966)
nonofrancisco   
2017-10-19 16:01   
Test Plan

Runing ReportPurchaseOrder.jrxml with currency EUR and date 01-01-2013

Execution time with unmodified report:
DEBUG org.openbravo.client.application.report.BaseReportActionHandler - Report: 95A65133A5314CAABEE405B1EB2A639D. Finish export JR process. Elapsed time: 8643

Execution time with modified report:
DEBUG org.openbravo.client.application.report.BaseReportActionHandler - Report: 95A65133A5314CAABEE405B1EB2A639D. Finish export JR process. Elapsed time: 5127
(0107990)
hgbot   
2018-11-19 17:29   
Repository: erp/devel/pi
Changeset: 381ee761e7393bbfe48f1297fbf76a1a6470f9d2
Author: Nono Carballo <nonofce <at> gmail.com>
Date: Fri Nov 16 12:39:03 2018 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/381ee761e7393bbfe48f1297fbf76a1a6470f9d2 [^]

Fixes issue 35702: Performance improvements in Purchase Order Report PDF format

1. Last "Group By" was removed
2. Unnecessary coalesces in mandatory columns were removed
3. Remove duplicated columns dateordered and transdate
4. Line net amount and price actual currency conversion are run in outer query
5. Names of business partner, product and uom retrieved via joins
6. The alternativeUom is calculated with a left join

---
M src/org/openbravo/erpCommon/ad_reports/ReportPurchaseOrder.jrxml
---
(0107991)
hgbot   
2018-11-19 17:29   
Repository: erp/devel/pi
Changeset: 2e096148d8cbeade803863e53b16d9e13df000e0
Author: Sandra Huguet <sandra.huguet <at> openbravo.com>
Date: Mon Nov 19 11:03:46 2018 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/2e096148d8cbeade803863e53b16d9e13df000e0 [^]

Related to issue 35702 Remove duplicated columns transdate

---
M src/org/openbravo/erpCommon/ad_reports/ReportPurchaseOrder.jrxml
---
(0107992)
Sandrahuguet   
2018-11-19 17:30   
Code review + testing OK
(0108475)
hudsonbot   
2018-12-11 20:22   
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/470e3cd384c5 [^]
Maturity status: Test
(0108476)
hudsonbot   
2018-12-11 20:22   
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/470e3cd384c5 [^]
Maturity status: Test