Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0033650
TypeCategorySeverityReproducibilityDate SubmittedLast Update
feature request[Openbravo ERP] 09. Financial managementmajoralways2016-08-08 13:502018-05-09 19:29
ReporterdmiguelezView Statuspublic 
Assigned ToAtulOpenbravo 
PriorityurgentResolutionfixedFixed in Version3.0PR18Q3
StatusclosedFix in branchFixed in SCM revision55af0c670202
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Tovmromanos
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0033650: Add columns in AD_Org table to persist data in order to improve performance

DescriptionAdd columns in AD_Org table to persist data in order to improve performance.

There are some places (like accounting process) that do call to this pl functions:
- ad_org_getperiodcontrolallow
- ad_org_getcalendarowner

Each call does not take a lot of time to be executed, but calling them several times in some places can create performance problems.

The idea is to include the information retrieved into a column in the ad_org table to improve the performance in this scenarios.
Steps To ReproduceAdd columns in AD_Org table to persist data in order to improve performance.

There are some places (like accounting process) that do call to this pl functions:
- ad_org_getperiodcontrolallow
- ad_org_getcalendarowner

Each call does not take a lot of time to be executed, but calling them several times in some places can create performance problems.

The idea is to include the information retrieved into a column in the ad_org table to improve the performance in this scenarios.
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
related to design defect 0024191 closeddmiguelez Accounting background process has bad performance 
related to defect 0033602 newTriage Finance LoginUtils.fillSessionArguments (query Attribute.selectOrgCurrency quite slow) around 100ms with many orgs 
related to defect 0033989 closedgorkaion Slow login loading organization's default ledgers 
blocks defect 0033681 schedulednonofrancisco General Ledger's field default value should be modified in GL Journal Header and Tax Payment windows 

-  Notes
(0104185)
hgbot (developer)
2018-05-02 10:21

Repository: erp/devel/pi
Changeset: 55af0c670202d7aef8f628f08bc4f29bbfa03f9d
Author: Atul Gaware <atul.gaware <at> openbravo.com>
Date: Thu Apr 26 18:54:30 2018 +0530
URL: http://code.openbravo.com/erp/devel/pi/rev/55af0c670202d7aef8f628f08bc4f29bbfa03f9d [^]

Fixes Issue 33650:Add columns in AD_Org table to persist data in order
to improve performance

** Add columns to store calendar owner org, period control allowed org,
legal entity org, business unit org and calendar of the period
control allowed org of the organization, Add field group and ready only
fields in organization window tab to show persist org information.
Field group is collapse by default.
** Added new function AD_ORG_GETCALENDAROWNERTN and
AD_ORG_GETPERIODCONTROLALLOWTN, AD_GET_ORG_LE_BU_TREENODE
from the original one with performance issues notes in it to only use
when organization are not set ready else use persist info from AD_Org
directly.
** Refactor AD_ORG_GETCALENDAROWNER, AD_ORG_GETPERIODCONTROLALLOW and
AD_GET_ORG_LE_BU to make use of respective new columns to use
AD_CALENDAROWNER_ORG_ID, AD_PERIODCONTROLALLOWED_ORG_ID,
AD_LEGALENTITY_ORG_ID or AD_BUSINESSUNIT_ORG_ID from AD_ORG directly.
** Modified AD_ORG_READY to set persist info columns in AD_ORG.
** To avoid triggers mutating error in oracle instance, instead of
calling directly functions to get persist org info in
update query, variables are used to get persist org info from ad_org
and then ad_org is updated.
** Modified AD_GET_ORG_LE_BU_TREENODE, remove condition
v_org_header_id<>'0' from while clause in p_type='BU' block.

---
M src-db/database/model/functions/AD_GET_ORG_LE_BU.xml
M src-db/database/model/functions/AD_ORG_GETCALENDAROWNER.xml
M src-db/database/model/functions/AD_ORG_GETPERIODCONTROLALLOW.xml
M src-db/database/model/functions/AD_ORG_READY.xml
M src-db/database/model/tables/AD_ORG.xml
M src-db/database/sourcedata/AD_COLUMN.xml
M src-db/database/sourcedata/AD_ELEMENT.xml
M src-db/database/sourcedata/AD_FIELD.xml
M src-db/database/sourcedata/AD_FIELDGROUP.xml
M src-db/database/sourcedata/AD_REFERENCE.xml
M src-db/database/sourcedata/OBUISEL_SELECTOR.xml
A src-db/database/model/functions/AD_GET_ORG_LE_BU_TREENODE.xml
A src-db/database/model/functions/AD_ORG_GETCALENDAROWNERTN.xml
A src-db/database/model/functions/AD_ORG_GETPERIODCONTROLALLOWTN.xml
---
(0104186)
hgbot (developer)
2018-05-02 10:21

Repository: erp/devel/pi
Changeset: 793f3d0ba3f50be0aac54fd99bcdd064141e0c60
Author: Atul Gaware <atul.gaware <at> openbravo.com>
Date: Thu Apr 26 23:45:59 2018 +0530
URL: http://code.openbravo.com/erp/devel/pi/rev/793f3d0ba3f50be0aac54fd99bcdd064141e0c60 [^]

Related to issue 33650:Modulescript to set persist org info

** Added Modulescript to populate AD_Org persist info columns
** Variables are used to get persist org info and then sent
to update method to avoid trigger mutating error in orcl
instance

---
A src-util/modulescript/build/classes/org/openbravo/modulescript/UpdatePersistOrgInfo.class
A src-util/modulescript/build/classes/org/openbravo/modulescript/UpdatePersistOrgInfoData.class
A src-util/modulescript/src/org/openbravo/modulescript/UpdatePersistOrgInfo.java
A src-util/modulescript/src/org/openbravo/modulescript/UpdatePersistOrgInfo_data.xsql
---
(0104187)
hgbot (developer)
2018-05-02 10:21

Repository: erp/devel/pi
Changeset: 8c8a72032173cc6fc4b044560e8f1162889621b0
Author: Atul Gaware <atul.gaware <at> openbravo.com>
Date: Thu Apr 26 22:49:57 2018 +0530
URL: http://code.openbravo.com/erp/devel/pi/rev/8c8a72032173cc6fc4b044560e8f1162889621b0 [^]

Related to issue 33650:Added junit test cases for persist org info task

** Added junit tests to verify persist info data in organization
for corner case orgs (*, null, org that does not exists)
** Added junit tests which creates a complex org tree, sets org as ready
with cascade Yes and No option and verifies persist org info.
** Added junit tests which create single org, two orgs one under another,
sets org as ready with cascade = Yes, Cascade = No option.

---
M src-test/src/org/openbravo/test/AllAntTaskTests.java
A src-test/src/org/openbravo/test/generalsetup/enterprise/organization/ADOrgPersistInfoConstants.java
A src-test/src/org/openbravo/test/generalsetup/enterprise/organization/ADOrgPersistInfoCornerCaseOrg.java
A src-test/src/org/openbravo/test/generalsetup/enterprise/organization/ADOrgPersistInfoSetReadyTest.java
A src-test/src/org/openbravo/test/generalsetup/enterprise/organization/ADOrgPersistInfoTest.java
A src-test/src/org/openbravo/test/generalsetup/enterprise/organization/ADOrgPersistInfoUtility.java
A src-test/src/org/openbravo/test/generalsetup/enterprise/organization/ADOrgPersistOrgInfoComplexOrgTreeTest.java
---
(0104188)
hgbot (developer)
2018-05-02 10:21

Repository: erp/devel/pi
Changeset: 7c2d30c7653fac8aca748a25b8e05269a3460680
Author: Atul Gaware <atul.gaware <at> openbravo.com>
Date: Thu Apr 26 22:17:42 2018 +0530
URL: http://code.openbravo.com/erp/devel/pi/rev/7c2d30c7653fac8aca748a25b8e05269a3460680 [^]

Related to issue 33650:Sample data updated with persist org info

Existing organization are updated with persist org info as part
of sample data.

---
M referencedata/sampledata/F_B_International_Group/AD_ORG.xml
---
(0104189)
hgbot (developer)
2018-05-02 10:21

Repository: erp/devel/pi
Changeset: a527992e021525e6c001a01595d92a95605e73b6
Author: Atul Gaware <atul.gaware <at> openbravo.com>
Date: Fri Apr 27 07:58:20 2018 +0530
URL: http://code.openbravo.com/erp/devel/pi/rev/a527992e021525e6c001a01595d92a95605e73b6 [^]

Related to issue 33650:Make use of persist org info column

Use ad_inheritedcalendar_id

---
M src-db/database/model/functions/C_GET_DEFAULT_PERIOD.xml
M src-db/database/model/functions/C_INVOICE_POST.xml
M src-db/database/model/functions/C_TAXPAYMENT_POST.xml
M src-db/database/model/triggers/C_PERIOD_TRG.xml
M src-db/database/sourcedata/AD_VAL_RULE.xml
M src/org/openbravo/erpCommon/ad_reports/ReportTrialBalanceDetail_data.xsql
---
(0104190)
hgbot (developer)
2018-05-02 10:22

Repository: erp/devel/pi
Changeset: a96849b0f37307bd0c2e3e260e962dd58dd234df
Author: Víctor Martínez Romanos <victor.martinez <at> openbravo.com>
Date: Thu Apr 26 16:25:58 2018 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/a96849b0f37307bd0c2e3e260e962dd58dd234df [^]

Related to issue 33650: code review improvements
Removed new reference Organization Selector for Persist Information and use instead existing Organization Simple Selector

---
M src-db/database/sourcedata/AD_COLUMN.xml
M src-db/database/sourcedata/AD_REFERENCE.xml
M src-db/database/sourcedata/OBUISEL_SELECTOR.xml
---
(0104191)
hgbot (developer)
2018-05-02 10:22

Repository: erp/devel/pi
Changeset: 7c01d27cda0f56862a61d5c2e77bf63a81b85aa6
Author: Víctor Martínez Romanos <victor.martinez <at> openbravo.com>
Date: Fri Apr 27 09:51:48 2018 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/7c01d27cda0f56862a61d5c2e77bf63a81b85aa6 [^]

Related to issue 33650: code review improvements
Improved functions documentation and comments

---
M src-db/database/model/functions/AD_GET_ORG_LE_BU.xml
M src-db/database/model/functions/AD_ORG_GETCALENDAROWNER.xml
M src-db/database/model/functions/AD_ORG_GETPERIODCONTROLALLOW.xml
M src-db/database/model/functions/AD_ORG_READY.xml
---
(0104192)
hgbot (developer)
2018-05-02 10:22

Repository: erp/devel/pi
Changeset: a30751ea9d6987176dcde2d473c38399721cd6a9
Author: Víctor Martínez Romanos <victor.martinez <at> openbravo.com>
Date: Fri Apr 27 09:59:55 2018 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/a30751ea9d6987176dcde2d473c38399721cd6a9 [^]

Related to issue 33650: code review improvements
Renamed field group to Inherited Information
Reordered fields

---
M src-db/database/sourcedata/AD_FIELD.xml
M src-db/database/sourcedata/AD_FIELDGROUP.xml
---
(0104193)
hgbot (developer)
2018-05-02 10:22

Repository: erp/devel/pi
Changeset: faca925fb578d243ee0ec42265f148cff683b9bf
Author: Víctor Martínez Romanos <victor.martinez <at> openbravo.com>
Date: Fri Apr 27 10:55:13 2018 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/faca925fb578d243ee0ec42265f148cff683b9bf [^]

Related to issue 33650: code review improvements
Properly format modulescript
Removed info message in module script
Increased limits
Ensure we don't work with * org and any organization where the persist org is already available

---
M src-util/modulescript/build/classes/org/openbravo/modulescript/UpdatePersistOrgInfo.class
M src-util/modulescript/build/classes/org/openbravo/modulescript/UpdatePersistOrgInfoData.class
M src-util/modulescript/src/org/openbravo/modulescript/UpdatePersistOrgInfo.java
M src-util/modulescript/src/org/openbravo/modulescript/UpdatePersistOrgInfo_data.xsql
---
(0104194)
hgbot (developer)
2018-05-02 10:22

Repository: erp/devel/pi
Changeset: d4e39005ae0e9d056b49b5db66f3228d903f4186
Author: Víctor Martínez Romanos <victor.martinez <at> openbravo.com>
Date: Fri Apr 27 10:59:04 2018 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/d4e39005ae0e9d056b49b5db66f3228d903f4186 [^]

Related to issue 33650: code review improvements
Updated sampledata for QA Testing client

---
M referencedata/sampledata/QA_Testing/AD_ORG.xml
---
(0104195)
hgbot (developer)
2018-05-02 10:22

Repository: erp/devel/pi
Changeset: 535fbcf42211fda4058dbfc86a71148a27ec6fee
Author: Víctor Martínez Romanos <victor.martinez <at> openbravo.com>
Date: Fri Apr 27 12:20:39 2018 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/535fbcf42211fda4058dbfc86a71148a27ec6fee [^]

Related to issue 33650: code review improvements
Improvements in JUnit tests:
 Avoid duplication of code
 Remove useless javadoc or comments
 Reorganize methods
 Remove useless log
 Improve asserts
 Renamed some classes
 Reduced classes and methods visibility where possible

---
M src-test/src/org/openbravo/test/AllAntTaskTests.java
M src-test/src/org/openbravo/test/generalsetup/enterprise/organization/ADOrgPersistInfoConstants.java
M src-test/src/org/openbravo/test/generalsetup/enterprise/organization/ADOrgPersistInfoSetReadyTest.java
M src-test/src/org/openbravo/test/generalsetup/enterprise/organization/ADOrgPersistInfoUtility.java
M src-test/src/org/openbravo/test/generalsetup/enterprise/organization/ADOrgPersistOrgInfoComplexOrgTreeTest.java
A src-test/src/org/openbravo/test/generalsetup/enterprise/organization/ADOrgPersistInfoCornerCaseOrgTest.java
A src-test/src/org/openbravo/test/generalsetup/enterprise/organization/ADOrgPersistInfoTestSuite.java
R src-test/src/org/openbravo/test/generalsetup/enterprise/organization/ADOrgPersistInfoCornerCaseOrg.java
R src-test/src/org/openbravo/test/generalsetup/enterprise/organization/ADOrgPersistInfoTest.java
---
(0104196)
hgbot (developer)
2018-05-02 10:22

Repository: erp/devel/pi
Changeset: ceaf52d36601eb6e7405ec3605bf05b835b2ed35
Author: Víctor Martínez Romanos <victor.martinez <at> openbravo.com>
Date: Wed May 02 09:55:08 2018 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/ceaf52d36601eb6e7405ec3605bf05b835b2ed35 [^]

Related to issue 33650: updated modulescript version limit

---
M src-util/modulescript/build/classes/org/openbravo/modulescript/UpdatePersistOrgInfo.class
M src-util/modulescript/src/org/openbravo/modulescript/UpdatePersistOrgInfo.java
---
(0104197)
hgbot (developer)
2018-05-02 10:22

Repository: erp/pmods/org.openbravo.retail.sampledata
Changeset: 71eb0e162dae655efc44b8c80e974e114c84fe2d
Author: Víctor Martínez Romanos <victor.martinez <at> openbravo.com>
Date: Wed May 02 09:58:56 2018 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.sampledata/rev/71eb0e162dae655efc44b8c80e974e114c84fe2d [^]

Related to issue 33650: updated retail sampledata

---
M referencedata/sampledata/The_White_Valley_Group/AD_ORG.xml
---
(0104200)
vmromanos (developer)
2018-05-02 12:09

Code review + testing OK

See:
http://wiki.openbravo.com/wiki/Projects:Persist_Organization_Information [^]
(0104413)
hudsonbot (developer)
2018-05-09 19:29

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/2be7d3efe606 [^]
Maturity status: Test
(0104414)
hudsonbot (developer)
2018-05-09 19:29

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/2be7d3efe606 [^]
Maturity status: Test
(0104415)
hudsonbot (developer)
2018-05-09 19:29

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/2be7d3efe606 [^]
Maturity status: Test
(0104416)
hudsonbot (developer)
2018-05-09 19:29

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/2be7d3efe606 [^]
Maturity status: Test
(0104417)
hudsonbot (developer)
2018-05-09 19:29

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/2be7d3efe606 [^]
Maturity status: Test
(0104418)
hudsonbot (developer)
2018-05-09 19:29

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/2be7d3efe606 [^]
Maturity status: Test
(0104419)
hudsonbot (developer)
2018-05-09 19:29

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/2be7d3efe606 [^]
Maturity status: Test
(0104420)
hudsonbot (developer)
2018-05-09 19:29

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/2be7d3efe606 [^]
Maturity status: Test
(0104421)
hudsonbot (developer)
2018-05-09 19:29

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/2be7d3efe606 [^]
Maturity status: Test
(0104422)
hudsonbot (developer)
2018-05-09 19:29

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/2be7d3efe606 [^]
Maturity status: Test
(0104423)
hudsonbot (developer)
2018-05-09 19:29

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/2be7d3efe606 [^]
Maturity status: Test
(0104424)
hudsonbot (developer)
2018-05-09 19:29

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/2be7d3efe606 [^]
Maturity status: Test

- Issue History
Date Modified Username Field Change
2016-08-08 13:50 dmiguelez New Issue
2016-08-08 13:50 dmiguelez Assigned To => Triage Finance
2016-08-08 13:50 dmiguelez Modules => Core
2016-08-08 13:50 dmiguelez Triggers an Emergency Pack => No
2016-08-08 14:02 dmiguelez Relationship added related to 0024191
2016-08-12 12:04 dmitry_mezentsev Relationship added related to 0033602
2016-09-12 12:37 aferraz Relationship added blocks 0033681
2016-09-15 12:50 shuehner Relationship added related to 0033989
2016-09-16 10:06 aferraz Relationship deleted related to 0033989
2016-09-16 10:06 aferraz Relationship added blocks 0033989
2016-09-16 10:33 aferraz Relationship deleted blocks 0033989
2016-09-16 10:33 aferraz Relationship added related to 0033989
2018-04-11 14:05 AtulOpenbravo Status new => scheduled
2018-04-11 14:05 AtulOpenbravo Assigned To Triage Finance => AtulOpenbravo
2018-05-02 10:21 hgbot Checkin
2018-05-02 10:21 hgbot Note Added: 0104185
2018-05-02 10:21 hgbot Status scheduled => resolved
2018-05-02 10:21 hgbot Resolution open => fixed
2018-05-02 10:21 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/55af0c670202d7aef8f628f08bc4f29bbfa03f9d [^]
2018-05-02 10:21 hgbot Checkin
2018-05-02 10:21 hgbot Note Added: 0104186
2018-05-02 10:21 hgbot Checkin
2018-05-02 10:21 hgbot Note Added: 0104187
2018-05-02 10:21 hgbot Checkin
2018-05-02 10:21 hgbot Note Added: 0104188
2018-05-02 10:21 hgbot Checkin
2018-05-02 10:21 hgbot Note Added: 0104189
2018-05-02 10:22 hgbot Checkin
2018-05-02 10:22 hgbot Note Added: 0104190
2018-05-02 10:22 hgbot Checkin
2018-05-02 10:22 hgbot Note Added: 0104191
2018-05-02 10:22 hgbot Checkin
2018-05-02 10:22 hgbot Note Added: 0104192
2018-05-02 10:22 hgbot Checkin
2018-05-02 10:22 hgbot Note Added: 0104193
2018-05-02 10:22 hgbot Checkin
2018-05-02 10:22 hgbot Note Added: 0104194
2018-05-02 10:22 hgbot Checkin
2018-05-02 10:22 hgbot Note Added: 0104195
2018-05-02 10:22 hgbot Checkin
2018-05-02 10:22 hgbot Note Added: 0104196
2018-05-02 10:22 hgbot Checkin
2018-05-02 10:22 hgbot Note Added: 0104197
2018-05-02 12:09 vmromanos Review Assigned To => vmromanos
2018-05-02 12:09 vmromanos Note Added: 0104200
2018-05-02 12:09 vmromanos Status resolved => closed
2018-05-02 12:09 vmromanos Fixed in Version => 3.0PR18Q3
2018-05-09 19:29 hudsonbot Checkin
2018-05-09 19:29 hudsonbot Note Added: 0104413
2018-05-09 19:29 hudsonbot Checkin
2018-05-09 19:29 hudsonbot Note Added: 0104414
2018-05-09 19:29 hudsonbot Checkin
2018-05-09 19:29 hudsonbot Note Added: 0104415
2018-05-09 19:29 hudsonbot Checkin
2018-05-09 19:29 hudsonbot Note Added: 0104416
2018-05-09 19:29 hudsonbot Checkin
2018-05-09 19:29 hudsonbot Note Added: 0104417
2018-05-09 19:29 hudsonbot Checkin
2018-05-09 19:29 hudsonbot Note Added: 0104418
2018-05-09 19:29 hudsonbot Checkin
2018-05-09 19:29 hudsonbot Note Added: 0104419
2018-05-09 19:29 hudsonbot Checkin
2018-05-09 19:29 hudsonbot Note Added: 0104420
2018-05-09 19:29 hudsonbot Checkin
2018-05-09 19:29 hudsonbot Note Added: 0104421
2018-05-09 19:29 hudsonbot Checkin
2018-05-09 19:29 hudsonbot Note Added: 0104422
2018-05-09 19:29 hudsonbot Checkin
2018-05-09 19:29 hudsonbot Note Added: 0104423
2018-05-09 19:29 hudsonbot Checkin
2018-05-09 19:29 hudsonbot Note Added: 0104424


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker