Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0023140Openbravo ERP00. Application dictionarypublic2013-02-21 12:412013-03-28 12:02
egoitz 
AugustoMauch 
urgentmajoralways
closedfixed 
5
 
3.0MP223.0MP22 
shankarb
Core
No
0023140: The update audit infrastructure process fails when the ad_org table is defined as isfullyaudited
The update audit infrastructure process fails when the ad_org table is defined as isfullyaudited.
After execute the process with the ad_org defined to be audited, the database locked and the process can not be executed again.
-Activate an instance with the professional sucription
-AS system adminsitratro define a template
-Go the tables definition window and check the ad_org table as fullyaduited.
-Execute the update audit infrastructure process
-The process finishes.
-Try to execute again.
*The process does not work.
After the first execution see that there is insert into ad_audit_trail window
that does not finish.
Also are locks on the database.
No tags attached.
Issue History
2013-02-21 12:41egoitzNew Issue
2013-02-21 12:41egoitzAssigned To => AugustoMauch
2013-02-21 12:41egoitzModules => Core
2013-02-21 12:41egoitzResolution time => 1362524400
2013-02-21 12:41egoitzTriggers an Emergency Pack => No
2013-02-25 05:51shankarbAssigned ToAugustoMauch => shankarb
2013-02-25 11:39shankarbAssigned Toshankarb => AugustoMauch
2013-03-06 13:06jonalegriaesarteNote Added: 0057093
2013-03-06 13:06jonalegriaesarteTarget Version3.0MP21 => 3.0MP22
2013-03-06 16:15AugustoMauchNote Added: 0057103
2013-03-20 06:35shankarbAssigned ToAugustoMauch => shankarb
2013-03-20 06:36shankarbStatusnew => scheduled
2013-03-20 06:36shankarbfix_in_branch => pi
2013-03-20 06:41shankarbReview Assigned To => AugustoMauch
2013-03-20 06:41shankarbfix_in_branchpi =>
2013-03-20 06:41shankarbIssue Monitored: AugustoMauch
2013-03-20 06:49hgbotCheckin
2013-03-20 06:49hgbotNote Added: 0057316
2013-03-20 06:49hgbotStatusscheduled => resolved
2013-03-20 06:49hgbotResolutionopen => fixed
2013-03-20 06:49hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/347ce63c377b3d3ddb63ce9dff31da0f9076bc1f [^]
2013-03-20 17:38AugustoMauchNote Added: 0057338
2013-03-20 17:38AugustoMauchStatusresolved => new
2013-03-20 17:38AugustoMauchResolutionfixed => open
2013-03-21 15:04hgbotCheckin
2013-03-21 15:04hgbotNote Added: 0057367
2013-03-21 15:04hgbotStatusnew => resolved
2013-03-21 15:04hgbotResolutionopen => fixed
2013-03-21 15:04hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/devel/pi/rev/347ce63c377b3d3ddb63ce9dff31da0f9076bc1f [^] => http://code.openbravo.com/erp/devel/pi/rev/815746476942eee8a7810bcfaf16b57cc2ef95b3 [^]
2013-03-25 18:09AugustoMauchIssue End Monitor: AugustoMauch
2013-03-25 18:10AugustoMauchNote Added: 0057450
2013-03-25 18:10AugustoMauchStatusresolved => new
2013-03-25 18:10AugustoMauchResolutionfixed => open
2013-03-25 21:12shuehnerIssue Monitored: shuehner
2013-03-26 10:42hgbotCheckin
2013-03-26 10:42hgbotNote Added: 0057456
2013-03-26 10:42hgbotStatusnew => resolved
2013-03-26 10:42hgbotResolutionopen => fixed
2013-03-26 10:42hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/devel/pi/rev/815746476942eee8a7810bcfaf16b57cc2ef95b3 [^] => http://code.openbravo.com/erp/devel/pi/rev/affe31812cc059b722cc1540c21b8557d06cacbc [^]
2013-03-26 12:30AugustoMauchNote Added: 0057459
2013-03-26 12:30AugustoMauchStatusresolved => new
2013-03-26 12:30AugustoMauchResolutionfixed => open
2013-03-26 12:30AugustoMauchAssigned Toshankarb => AugustoMauch
2013-03-26 12:39hgbotCheckin
2013-03-26 12:39hgbotNote Added: 0057460
2013-03-26 12:39hgbotCheckin
2013-03-26 12:39hgbotNote Added: 0057461
2013-03-26 12:39hgbotCheckin
2013-03-26 12:39hgbotNote Added: 0057462
2013-03-26 16:45AugustoMauchReview Assigned ToAugustoMauch => shankarb
2013-03-26 16:45AugustoMauchIssue Monitored: shankarb
2013-03-26 16:46hgbotCheckin
2013-03-26 16:46hgbotNote Added: 0057474
2013-03-26 16:46hgbotStatusnew => resolved
2013-03-26 16:46hgbotResolutionopen => fixed
2013-03-26 16:46hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/devel/pi/rev/affe31812cc059b722cc1540c21b8557d06cacbc [^] => http://code.openbravo.com/erp/devel/pi/rev/496a086a1450d6f92d9447fd5dce0afc473b653c [^]
2013-03-28 01:39hudsonbotCheckin
2013-03-28 01:39hudsonbotNote Added: 0057518
2013-03-28 01:39hudsonbotCheckin
2013-03-28 01:39hudsonbotNote Added: 0057520
2013-03-28 01:39hudsonbotCheckin
2013-03-28 01:39hudsonbotNote Added: 0057521
2013-03-28 01:39hudsonbotCheckin
2013-03-28 01:39hudsonbotNote Added: 0057522
2013-03-28 01:39hudsonbotCheckin
2013-03-28 01:39hudsonbotNote Added: 0057523
2013-03-28 12:02shankarbNote Added: 0057533
2013-03-28 12:02shankarbStatusresolved => closed
2013-03-28 12:02shankarbFixed in Version => 3.0MP22

Notes
(0057093)
jonalegriaesarte   
2013-03-06 13:06   
Moved to MP22, because the fix has to be tested in depth
(0057103)
AugustoMauch   
2013-03-06 16:15   
The same thing happens when the ad_client table is audited
(0057316)
hgbot   
2013-03-20 06:49   
Repository: erp/devel/pi
Changeset: 347ce63c377b3d3ddb63ce9dff31da0f9076bc1f
Author: Shankar Balachandran <shankar.balachandran <at> openbravo.com>
Date: Wed Mar 20 11:18:53 2013 +0530
URL: http://code.openbravo.com/erp/devel/pi/rev/347ce63c377b3d3ddb63ce9dff31da0f9076bc1f [^]

Fixes Issue 23140 : update audit infrastructure fails with client and org tables

With the fix, when update audit infrastructure is executed from application, the client and org tables are excluded.
An ant task has been created to run the same process including client and org tables.

---
M build.xml
M src-db/database/model/postscript-Oracle.sql
M src-db/database/model/postscript-PostgreSql.sql
M src-db/database/sourcedata/AD_MESSAGE.xml
---
(0057338)
AugustoMauch   
2013-03-20 17:38   
Consider the following case:
- There are audit triggers defined for ad_org or ad_client
- Set the Fully Audited field for both tables to 'N'
- Execute the Update Audit Trail Infrastucture process
- The triggers will not be deleted but the user will not be informed about that.

Two ways to solve this:
- First, check if it is possible to delete the triggers of those tables executing the Update Audit Trail Infrastucture process from the ERP. If it is possible, then change that part of the code in the procedure.
- If it is not possible, then a message should be shown to the user telling him what happened and advising him to execute the new ant task.
(0057367)
hgbot   
2013-03-21 15:04   
Repository: erp/devel/pi
Changeset: 815746476942eee8a7810bcfaf16b57cc2ef95b3
Author: Shankar Balachandran <shankar.balachandran <at> openbravo.com>
Date: Thu Mar 21 19:32:06 2013 +0530
URL: http://code.openbravo.com/erp/devel/pi/rev/815746476942eee8a7810bcfaf16b57cc2ef95b3 [^]

Fixes Issue 23140 : Update Audit Trail process error

Now the process notifies if it is unable to delete any trigger and does not create locks on database.

---
M src-db/database/model/postscript-Oracle.sql
M src-db/database/model/postscript-PostgreSql.sql
M src-db/database/sourcedata/AD_MESSAGE.xml
---
(0057450)
AugustoMauch   
2013-03-25 18:10   
The update.audit.trail.infrastructure ant task does not work in Oracle. SELECT ad_create_audit_triggers(null) from DUAL; should be used instead of SELECT ad_create_audit_triggers(null);

More changes might be needed.
(0057456)
hgbot   
2013-03-26 10:42   
Repository: erp/devel/pi
Changeset: affe31812cc059b722cc1540c21b8557d06cacbc
Author: Shankar Balachandran <shankar.balachandran <at> openbravo.com>
Date: Tue Mar 26 15:10:46 2013 +0530
URL: http://code.openbravo.com/erp/devel/pi/rev/affe31812cc059b722cc1540c21b8557d06cacbc [^]

Fixes Issue 0023140 : DB specific ant task for update audit trail process

Create seperate sub targets for oracle and postgres method call of ad_create_audit_triggers procedure.
Also create condition targets to check whether the instance is an oracle instance or postgres instance.

---
M build.xml
---
(0057459)
AugustoMauch   
2013-03-26 12:30   
A simpler approach is going to be followed to fix this issue. UpdateAuditTrail.java will be changed so that it does not use DAL to call the ad_create_audit_triggers function
(0057460)
hgbot   
2013-03-26 12:39   
Repository: erp/devel/pi
Changeset: 072180e28880f5ffdbf629f980e17768bd6fd729
Author: Shankar Balachandran <shankar.balachandran <at> openbravo.com>
Date: Tue Mar 26 16:59:04 2013 +0530
URL: http://code.openbravo.com/erp/devel/pi/rev/072180e28880f5ffdbf629f980e17768bd6fd729 [^]

Related to Issue 23140 : backout changeset affe31812cc0

Backout changeset as issue will be solved using DAL.

---
M build.xml
---
(0057461)
hgbot   
2013-03-26 12:39   
Repository: erp/devel/pi
Changeset: 7f04374e01e72ec87ef31bdbe8039e834e193565
Author: Shankar Balachandran <shankar.balachandran <at> openbravo.com>
Date: Tue Mar 26 17:02:30 2013 +0530
URL: http://code.openbravo.com/erp/devel/pi/rev/7f04374e01e72ec87ef31bdbe8039e834e193565 [^]

Related to Issue 23140 : Backout changeset 815746476942

Backout changeset as issue will be solved using DAL.

---
M src-db/database/model/postscript-Oracle.sql
M src-db/database/model/postscript-PostgreSql.sql
M src-db/database/sourcedata/AD_MESSAGE.xml
---
(0057462)
hgbot   
2013-03-26 12:39   
Repository: erp/devel/pi
Changeset: 53e0162a749a6d279a03870aef3c713334922878
Author: Shankar Balachandran <shankar.balachandran <at> openbravo.com>
Date: Tue Mar 26 17:08:05 2013 +0530
URL: http://code.openbravo.com/erp/devel/pi/rev/53e0162a749a6d279a03870aef3c713334922878 [^]

Related to Issue 23140 : Backout changeset 347ce63c377b

Backout changeset as issue will be solved using DAL.

---
M build.xml
M src-db/database/model/postscript-Oracle.sql
M src-db/database/model/postscript-PostgreSql.sql
M src-db/database/sourcedata/AD_MESSAGE.xml
---
(0057474)
hgbot   
2013-03-26 16:46   
Repository: erp/devel/pi
Changeset: 496a086a1450d6f92d9447fd5dce0afc473b653c
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Tue Mar 26 16:44:21 2013 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/496a086a1450d6f92d9447fd5dce0afc473b653c [^]

Fixes issue 23140: Uses xsql instead of DAL to update audit trail triggers

When the user update the audit trail triggers from the ERP, the database procedure is called from UpdateAuditTrail.java. It used to do it using the CallProcess class, but that resulted in database locks if the triggers of AD_CLIENT or AD_ORG were updated. This has been fixed by using a xsql function instead of DAL, and retrieving the connection from bundle.getConnection() instead of from OBDal.getInstance().getConnection().

---
M src/org/openbravo/erpCommon/ad_process/UpdateAuditTrail.java
A src/org/openbravo/erpCommon/ad_process/UpdateAuditTrail_data.xsql
---
(0057518)
hudsonbot   
2013-03-28 01:39   
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/6c4c5ed08030 [^]

Maturity status: Test
(0057520)
hudsonbot   
2013-03-28 01:39   
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/6c4c5ed08030 [^]

Maturity status: Test
(0057521)
hudsonbot   
2013-03-28 01:39   
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/6c4c5ed08030 [^]

Maturity status: Test
(0057522)
hudsonbot   
2013-03-28 01:39   
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/6c4c5ed08030 [^]

Maturity status: Test
(0057523)
hudsonbot   
2013-03-28 01:39   
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/6c4c5ed08030 [^]

Maturity status: Test
(0057533)
shankarb   
2013-03-28 12:02   
Code reviewed and tested in pi changeset dcf503f0d385