Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0013649Openbravo ERPA. Platformpublic2010-06-14 16:072012-03-02 15:34
rafaroda 
marvintm 
highmajoralways
closedfixed 
20Community Appliance
2.50MP18 
3.0MP93.0MP9 
Core
No
0013649: Exclude Audit Info does not apply to children business object
Exclude Audit Info does not apply to children business object.

When defining a dataset and select:
* the table where it does apply
* whether the table is a business object (to select children information - header/lines)
* whether you want audit info to be exported

If you tick both "Exclude Audit Info" and "IsBusinessObject" check-boxes, you want, for instance, roles to be exported with their allowed windows, processes and forms, all this without audit info.

But when you inspect the data set or try to apply it in a new client (via Initial Client Setup), the process fails because audit information has been exported for children tables of the role table.

Some documentation:
* Dataset theory 1 http://wiki.openbravo.com/wiki/Projects/Modularity/Reference_Data#Data_Sets [^]
* Dataset theory 2 http://wiki.openbravo.com/wiki/ERP/2.50/Developers_Guide/Concepts/AD/Dataset [^]
* Dataset example 1 http://wiki.openbravo.com/wiki/Localization_Process#Creating_a_standard_reference_data_module [^]
* Dataset example 2 http://wiki.openbravo.com/wiki/ERP/2.50/Developers_Guide/How_to_create_a_dataset [^]
Logged as an Entity Administrator:
1) Create new role @ General Setup || Security || Role
* Name: Sales Role
* Select User Level: Client/Organization
* Manual: ticked - Yes
2) Click on the Grant Access button and select:
* Module: Sales Management
* Access To: All

Logged as a System Administrator:
1) Create a new module @ Application Dictionary || Module
* Name: Roles Module
* Has Reference Data: ticked - Yes
2) Create a new dataset @ Application Dictionary || Dataset
* Name: Roles
* Data Access Level: System/Client
3) In Table tab:
* Table: AD_Role
* Module: Roles Module
* SQL Where Clause (replace by the Entity ID where you created the role): client.id='3919778CCEDA4DF796AB931292B6854F'
* Exclude Audit Info: ticked - Yes
* IsBusinessObject: ticked - Yes
4) Go back to dataset header and click on Export Reference Data
5) Do an Initial Client Setup selecting this Role reference data @ General Setup || Client || Initial Client Setup

You will get the error message. In log a3196480 13:27:33 [ajp-8009-2] INFO org.openbravo.erpCommon.utility.ErrorTextParserPOSTGRE - did not find constraint name for error message: Referenced object ADUser (id: null / ADUser7FF9791D513B4B78BEE5F4F821F71D66) not present in the xml or in the database.
Workaround: in the dataset referencedata XMl file remove all the lines looking like:
* <createdBy transient="true" ...
* <updatedBy transient="true" ...
dev-platform-quick-wins, OB3-Reviewed
Issue History
2010-06-14 16:07rafarodaNew Issue
2010-06-14 16:07rafarodaAssigned To => alostale
2010-06-14 16:08rafarodaAssigned Toalostale => marvintm
2010-06-23 10:35alostaleStatusnew => scheduled
2010-06-23 10:35alostalefix_in_branch => pi
2010-08-30 15:37rafarodaTag Attached: dev-platform-quick-wins
2011-10-28 20:18iciordiaTag Attached: OB3-Reviewed
2012-01-11 18:03hgbotCheckin
2012-01-11 18:03hgbotNote Added: 0044278
2012-01-11 18:03hgbotStatusscheduled => resolved
2012-01-11 18:03hgbotResolutionopen => fixed
2012-01-11 18:03hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/f73c0354c932034fbfa3d5a7cd1c274e631b45e6 [^]
2012-01-12 09:33hgbotCheckin
2012-01-12 09:33hgbotNote Added: 0044282
2012-01-12 09:37hgbotCheckin
2012-01-12 09:37hgbotNote Added: 0044283
2012-01-12 09:37hgbotCheckin
2012-01-12 09:37hgbotNote Added: 0044284
2012-01-14 21:21hudsonbotCheckin
2012-01-14 21:21hudsonbotNote Added: 0044375
2012-01-14 21:21hudsonbotCheckin
2012-01-14 21:21hudsonbotNote Added: 0044376
2012-01-14 21:21hudsonbotCheckin
2012-01-14 21:21hudsonbotNote Added: 0044377
2012-01-14 21:21hudsonbotCheckin
2012-01-14 21:21hudsonbotNote Added: 0044378
2012-01-25 10:16marvintmNote Added: 0044545
2012-01-25 10:16marvintmStatusresolved => new
2012-01-25 10:16marvintmResolutionfixed => open
2012-01-25 10:17marvintmTarget Version => 3.0MP9
2012-01-25 10:17marvintmfix_in_branchpi =>
2012-02-02 13:13hgbotCheckin
2012-02-02 13:13hgbotNote Added: 0044809
2012-02-02 13:13hgbotStatusnew => resolved
2012-02-02 13:13hgbotResolutionopen => fixed
2012-02-02 13:13hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/devel/pi/rev/f73c0354c932034fbfa3d5a7cd1c274e631b45e6 [^] => http://code.openbravo.com/erp/devel/pi/rev/8fd235980bfd0abd379386ff9b371af67aefc172 [^]
2012-02-09 16:20marvintmNote Added: 0044968
2012-02-21 10:42alostaleNote Added: 0045299
2012-02-21 10:42alostaleStatusresolved => closed
2012-02-21 10:42alostaleFixed in Version => 3.0MP9
2012-03-02 15:34hudsonbotCheckin
2012-03-02 15:34hudsonbotNote Added: 0045732

Notes
(0044278)
hgbot   
2012-01-11 18:03   
Repository: erp/devel/pi
Changeset: f73c0354c932034fbfa3d5a7cd1c274e631b45e6
Author: Antonio Moreno <antonio.moreno <at> openbravo.com>
Date: Wed Jan 11 18:02:52 2012 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/f73c0354c932034fbfa3d5a7cd1c274e631b45e6 [^]

Fixed issue 13649. Exclude Audit Info will now also apply to children objects

---
M src/org/openbravo/dal/xml/EntityXMLConverter.java
M src/org/openbravo/service/dataset/DataSetService.java
---
(0044282)
hgbot   
2012-01-12 09:33   
Repository: erp/devel/pi
Changeset: b5352d5513c3ee573ff525cc6c95c729dc0fe2c8
Author: Antonio Moreno <antonio.moreno <at> openbravo.com>
Date: Thu Jan 12 09:32:36 2012 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/b5352d5513c3ee573ff525cc6c95c729dc0fe2c8 [^]

Related to issue 13649. Make condition more robust to avoid failure

---
M src/org/openbravo/dal/xml/EntityXMLConverter.java
---
(0044283)
hgbot   
2012-01-12 09:37   
Repository: erp/devel/pi
Changeset: 64263470f594dcd5ecbf79b142b6ebcf13fca7f1
Author: Antonio Moreno <antonio.moreno <at> openbravo.com>
Date: Thu Jan 12 09:36:34 2012 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/64263470f594dcd5ecbf79b142b6ebcf13fca7f1 [^]

Related to issue 13649. Make condition even more robust to avoid failure

---
M src/org/openbravo/dal/xml/EntityXMLConverter.java
---
(0044284)
hgbot   
2012-01-12 09:37   
Repository: erp/devel/pi
Changeset: da0131b03de68691e8234637c7333f86ce5d51a0
Author: Antonio Moreno <antonio.moreno <at> openbravo.com>
Date: Thu Jan 12 09:37:13 2012 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/da0131b03de68691e8234637c7333f86ce5d51a0 [^]

Related to issue 13649. Make condition even more robust to avoid failure

---
M src/org/openbravo/dal/xml/EntityXMLConverter.java
---
(0044375)
hudsonbot   
2012-01-14 21:21   
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/0f91795528e4 [^]

Maturity status: Test
(0044376)
hudsonbot   
2012-01-14 21:21   
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/0f91795528e4 [^]

Maturity status: Test
(0044377)
hudsonbot   
2012-01-14 21:21   
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/0f91795528e4 [^]

Maturity status: Test
(0044378)
hudsonbot   
2012-01-14 21:21   
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/0f91795528e4 [^]

Maturity status: Test
(0044545)
marvintm   
2012-01-25 10:16   
The fix for this issue has been reverted in changeset:

https://code.openbravo.com/erp/devel/pi/rev/f3877b10d80d [^]

It will be pushed again in next MP.
(0044809)
hgbot   
2012-02-02 13:13   
Repository: erp/devel/pi
Changeset: 8fd235980bfd0abd379386ff9b371af67aefc172
Author: Antonio Moreno <antonio.moreno <at> openbravo.com>
Date: Thu Feb 02 13:12:58 2012 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/8fd235980bfd0abd379386ff9b371af67aefc172 [^]

Fixed issue 13649. Exclude Audit Info will now also apply to children objects

---
M src/org/openbravo/dal/xml/EntityXMLConverter.java
M src/org/openbravo/service/dataset/DataSetService.java
---
(0044968)
marvintm   
2012-02-09 16:20   
Test plan:

- Follow the instructions described in the issue to create a dataset which contains reference data, marked with the "exclude audit info" check.
- Export this reference data. Verify that children objects no longer contain audit information (creation date, created by, updated, updated by fields).
- Import this reference data into another client. Verify that the data was correctly imported.
(0045299)
alostale   
2012-02-21 10:42   
Code reviewed and tested on pi@8e3bca6e8153
(0045732)
hudsonbot   
2012-03-02 15:34   
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/544d64e0c159 [^]

Maturity status: Test