Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0028951Openbravo ERP04. Warehouse managementpublic2014-11-06 12:142015-02-23 05:11
umartirena 
umartirena 
normalmajoralways
closedfixed 
5
 
3.0PR15Q1.1pi 
eduardo_Argal
Core
No
0028951: InitializeMTransCostDateacctData modulescript has several performance issues
"InitializeMTransCostDateacctData" modulescript has several performance issues with big amount of data. This happens because modulescripts are executed when the indexes of database are not created yet.
Execute update.database on a database with big amount of data.
Remove the "InitializeMTransCostDateacctData" modulescript and implement that functionality in the "Costing Background process". Create a preference when the process has been executed in order to control that only is executed once.
Add a verification on "Valued Stock Report" and on "Sales Invoice Dimensional Report" to be able to run it only after the execution of "Costing Background process".
No tags attached.
blocks defect 00281113.0PR15Q2 closed umartirena InitializeMTransCostDateacctData modulescript has several performance issues 
Issue History
2015-02-16 12:30plujanTypedefect => backport
2015-02-16 12:30plujanfix_in_branch => 3.0MP29
2015-02-16 12:30plujanTarget Version3.0PR15Q2 => 3.0PR15Q1.1
2015-02-16 12:30plujanfix_in_branch3.0MP29 =>
2015-02-16 16:02hgbotCheckin
2015-02-16 16:02hgbotNote Added: 0074516
2015-02-16 16:02hgbotStatusscheduled => resolved
2015-02-16 16:02hgbotResolutionopen => fixed
2015-02-16 16:02hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/7a7b3954ec5964e56e2ef8e2d3c5d1589204dc4a [^]
2015-02-17 10:30hgbotCheckin
2015-02-17 10:30hgbotNote Added: 0074545
2015-02-18 11:48hgbotCheckin
2015-02-18 11:48hgbotNote Added: 0074590
2015-02-18 12:16eduardo_ArgalReview Assigned To => eduardo_Argal
2015-02-18 12:16eduardo_ArgalNote Added: 0074591
2015-02-18 12:16eduardo_ArgalStatusresolved => closed
2015-02-18 14:04umartirenaNote Added: 0074600
2015-02-18 14:04umartirenaStatusclosed => new
2015-02-18 14:04umartirenaResolutionfixed => open
2015-02-18 14:06hgbotCheckin
2015-02-18 14:06hgbotNote Added: 0074602
2015-02-18 14:06umartirenaStatusnew => scheduled
2015-02-18 14:06umartirenafix_in_branch => pi
2015-02-18 14:06umartirenaStatusscheduled => resolved
2015-02-18 14:06umartirenaFixed in Version => pi
2015-02-18 14:06umartirenaResolutionopen => fixed
2015-02-20 09:13SandrahuguetNote Added: 0074688
2015-02-20 09:13SandrahuguetStatusresolved => closed
2015-02-23 05:11hudsonbotCheckin
2015-02-23 05:11hudsonbotNote Added: 0074764
2015-02-23 05:11hudsonbotCheckin
2015-02-23 05:11hudsonbotNote Added: 0074770
2015-02-23 05:11hudsonbotCheckin
2015-02-23 05:11hudsonbotNote Added: 0074782
2015-02-23 05:11hudsonbotCheckin
2015-02-23 05:11hudsonbotNote Added: 0074785

Notes
(0074516)
hgbot   
2015-02-16 16:02   
Repository: erp/devel/pi
Changeset: 7a7b3954ec5964e56e2ef8e2d3c5d1589204dc4a
Author: Unai Martirena <unai.martirena <at> openbravo.com>
Date: Mon Feb 16 16:00:25 2015 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/7a7b3954ec5964e56e2ef8e2d3c5d1589204dc4a [^]

Fixes bug 28111, Fixes bug 28951: InitCostDateacct modulescript has been removed

The functionality that was being implemented in the modulescript now will be done in Costing Background process. An oncreatedefault has been added in dateacct column because it has a constraint of not null. The date set to the column will be 01-01-1970, and this date will be used as a reference while updating it in Costing Background process

---
M src-db/database/model/tables/M_TRANSACTION_COST.xml
M src-db/database/sourcedata/AD_MESSAGE.xml
M src/org/openbravo/costing/CostingBackground.java
M src/org/openbravo/erpCommon/ad_reports/ReportInvoiceCustomerDimensionalAnalysesJR.java
M src/org/openbravo/erpCommon/ad_reports/ReportValuationStock.java
A build/javasqlc/src/org/openbravo/costing/InitializeCostingMTransCostDateacctData.java
A src/org/openbravo/costing/InitializeCostingMTransCostDateacct_data.xsql
R src-util/modulescript/build/classes/org/openbravo/modulescript/InitializeMTransCostDateacct.class
R src-util/modulescript/build/classes/org/openbravo/modulescript/InitializeMTransCostDateacctData.class
R src-util/modulescript/src/org/openbravo/modulescript/InitializeMTransCostDateacct.java
R src-util/modulescript/src/org/openbravo/modulescript/InitializeMTransCostDateacct_data.xsql
---
(0074545)
hgbot   
2015-02-17 10:30   
Repository: erp/devel/pi
Changeset: e2e44617a15698fd1dbc40a7d50888784bfb41db
Author: Unai Martirena <unai.martirena <at> openbravo.com>
Date: Tue Feb 17 10:28:34 2015 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/e2e44617a15698fd1dbc40a7d50888784bfb41db [^]

Related to bug 28111,related to bug 28951: Remove xsql Data class file

---
R build/javasqlc/src/org/openbravo/costing/InitializeCostingMTransCostDateacctData.java
---
(0074590)
hgbot   
2015-02-18 11:48   
Repository: erp/devel/pi
Changeset: bb5fb83de69573b861872d87fcd01da7a6bf169f
Author: Unai Martirena <unai.martirena <at> openbravo.com>
Date: Wed Feb 18 11:46:11 2015 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/bb5fb83de69573b861872d87fcd01da7a6bf169f [^]

Related to bug 28111,related to bug 28951: Fix on oncreatedefault

oncreatedefault statement of dateacct has been changed in order to work both in oracle and postgres with different date formats.
Also to_date has been removed from background process in order to allways the filter work.

---
M src-db/database/model/tables/M_TRANSACTION_COST.xml
M src/org/openbravo/costing/InitializeCostingMTransCostDateacct_data.xsql
---
(0074591)
eduardo_Argal   
2015-02-18 12:16   
Code Reviewed and tested.
Now there is no module script so no performance penalty.
the background process works fine.
Reports displays an error if data is not yet fixed
(0074600)
umartirena   
2015-02-18 14:04   
Issue reopened in order to change the where clause in Costing Background process to get m_transaction_cost records to update. Filter by same dateformat as set in oncreatedefault expression.
(0074602)
hgbot   
2015-02-18 14:06   
Repository: erp/devel/pi
Changeset: 50eefca6fdf24dce85e7fd364e57c85a7b551d73
Author: Unai Martirena <unai.martirena <at> openbravo.com>
Date: Wed Feb 18 14:02:30 2015 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/50eefca6fdf24dce85e7fd364e57c85a7b551d73 [^]

Related to bug 28111,related to bug 28951: Fix on where clause

Filter m_transaction_cost records in Costing Background process using same dateformat that has been used in oncreatedefault to insert values

---
M src/org/openbravo/costing/InitializeCostingMTransCostDateacct_data.xsql
---
(0074688)
Sandrahuguet   
2015-02-20 09:13   
last change is reviewed
(0074764)
hudsonbot   
2015-02-23 05:11   
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/6856352d7235 [^]
Maturity status: Test
(0074770)
hudsonbot   
2015-02-23 05:11   
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/6856352d7235 [^]
Maturity status: Test
(0074782)
hudsonbot   
2015-02-23 05:11   
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/6856352d7235 [^]
Maturity status: Test
(0074785)
hudsonbot   
2015-02-23 05:11   
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/6856352d7235 [^]
Maturity status: Test