Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0024005Openbravo ERPA. Platformpublic2013-06-06 12:202013-06-20 02:08
egoitz 
alostale 
immediatemajoralways
closedfixed 
5
 
3.0MP24 
AugustoMauch
Core
Production - Confirmed Stable
2011-02-09
https://code.openbravo.com/erp/devel/pi/rev/3cc3d1a740b29ae39c0eadb9e2f498124c980514 [^]
No
0024005: When doing changes on an element using dal the Ad_context_info is not filled so the audit does not work properly
When doing changes on an element using dal the Ad_context_info is not filled so the audit does not work properly.

When saving or changing a row of and audited table, from an standard window, the audit saves the user, the process and process type, taking it from the ad_context_info table.

If the changes are done from a java class using DAL, and the java class implements org.openbravo.scheduling.Process , in these case the audit does not save the user, process and processtype.

-Create a new column on the m_product table.
-Create the column and field on an application dictionary.
-Create a java process implementing org.openbravo.scheduling.Process. The java will update the description of the product.
-Define the process on AD and assign to the new column.
-Check the m_product table to be audited and run update audit infrastructure prcoess.
-After compile all the previous changes go to the application.
-Change a product using the window.
-See that on the ad_audit_trail table a new row is inserted for that change. This also includes user, process and process type values.
-Execute the button
*See that a new row is inserted on ad_audit_trail table, but the columns user,process and processtype are not updated.
No tags attached.
related to defect 00158742.50MP27 closed alostale Permissions to processes are not respected 
related to defect 0034766 closed alostale Incomplete audit trail info for elements created from WebPOS 
Issue History
2013-06-06 12:20egoitzNew Issue
2013-06-06 12:20egoitzAssigned To => AugustoMauch
2013-06-06 12:20egoitzModules => Core
2013-06-06 12:20egoitzTriggers an Emergency Pack => No
2013-06-06 16:02egoitzPriorityurgent => immediate
2013-06-11 09:49alostaleNote Added: 0059316
2013-06-11 17:04alostaleAssigned ToAugustoMauch => alostale
2013-06-11 17:05alostaleReview Assigned To => AugustoMauch
2013-06-11 17:34alostaleNote Added: 0059368
2013-06-11 17:36alostaleNote Edited: 0059368bug_revision_view_page.php?bugnote_id=0059368#r4788
2013-06-11 17:38hgbotCheckin
2013-06-11 17:38hgbotNote Added: 0059369
2013-06-11 17:38hgbotStatusnew => resolved
2013-06-11 17:38hgbotResolutionopen => fixed
2013-06-11 17:38hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/a01dafe2de400a60e3c13af40d3e53400e3ad3a3 [^]
2013-06-12 08:25alostaleStatusresolved => new
2013-06-12 08:25alostaleResolutionfixed => open
2013-06-12 08:26alostaleRegression level => Production - Confirmed Stable
2013-06-12 08:26alostaleRegression date => 2011-02-09
2013-06-12 08:26alostaleRegression introduced by commit => https://code.openbravo.com/erp/devel/pi/rev/3cc3d1a740b29ae39c0eadb9e2f498124c980514 [^]
2013-06-12 08:26alostaleRelationship addedrelated to 0015874
2013-06-12 08:26alostaleNote Added: 0059374
2013-06-12 08:27alostaleStatusnew => scheduled
2013-06-12 08:27alostalefix_in_branch => pi
2013-06-12 08:27alostaleStatusscheduled => resolved
2013-06-12 08:27alostaleResolutionopen => fixed
2013-06-13 17:06AugustoMauchNote Added: 0059424
2013-06-13 17:06AugustoMauchStatusresolved => closed
2013-06-13 17:06AugustoMauchFixed in Version => 3.0MP24
2013-06-20 02:08hudsonbotCheckin
2013-06-20 02:08hudsonbotNote Added: 0059568
2016-12-19 11:02alostaleRelationship addedrelated to 0034766

Notes
(0059316)
alostale   
2013-06-11 09:49   
Review also P&E and Param Windows
(0059368)
alostale   
2013-06-11 17:34   
(edited on: 2013-06-11 17:36)
Test plan for this issue is in TestLink -> Audit Trail -> Communit-7300:Audit trail in processes

Tested with DAL and XSQL. In XSQL tested getting connection with bundle.getConnection and new DalConnectionProvider()

(0059369)
hgbot   
2013-06-11 17:38   
Repository: erp/devel/pi
Changeset: a01dafe2de400a60e3c13af40d3e53400e3ad3a3
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Tue Jun 11 17:32:55 2013 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/a01dafe2de400a60e3c13af40d3e53400e3ad3a3 [^]

fixed bug 24005: incomplete audit trail info in processes

  Audit trail information was missing process and/or user in the following cases:

   1. Java processes using DAL invoked from generated windows
   2. Java processes using DAL invoked from menu
   3. Process definition

  In cases 1 and 2, the problem was audit info was set in ThreadLocal after the
  DB temporary table was updated.

  In case 3, it was not set at all.

---
M modules/org.openbravo.client.application/src/org/openbravo/client/application/process/BaseProcessActionHandler.java
M src-core/src/org/openbravo/database/SessionInfo.java
M src-db/database/sourcedata/AD_REF_LIST.xml
M src-wad/src/org/openbravo/wad/ActionButtonJava_Responser.javaxml
M src-wad/src/org/openbravo/wad/ActionButton_Responser.javaxml
M src-wad/src/org/openbravo/wad/Wad.java
M src-wad/src/org/openbravo/wad/javasource.javaxml
M src-wad/src/org/openbravo/wad/javasource.xml
M src/org/openbravo/erpCommon/businessUtility/AuditTrailPopup.java
M src/org/openbravo/scheduling/ProcessBundle.java
---
(0059374)
alostale   
2013-06-12 08:26   
Regression introduced in 2.50MP27/3.0RC4
(0059424)
AugustoMauch   
2013-06-13 17:06   
Code reviewed and verified in pi@bde534f03bd4
(0059568)
hudsonbot   
2013-06-20 02:08   
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/5caf871044ad [^]

Maturity status: Test