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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0023990
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] A. Platformmajorsometimes2013-06-05 11:312013-07-16 14:26
ReportervmromanosView Statuspublic 
Assigned ToAugustoMauch 
PriorityimmediateResolutionfixedFixed in Version3.0MP25
StatusclosedFix in branchFixed in SCM revision83447d2c67e2
ProjectionnoneETAnoneTarget Version
OSLinux 32 bitDatabasePostgreSQLJava version1.6.0_12
OS VersionDebian 5.0Database version8.3.8Ant version1.7.0
Product Version3.0MP21.1SCM revision 
Review Assigned Toshankarb
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0023990: Permission error when applying datasets

DescriptionI'm getting a random error related to permissions when applying the core's dataset from either the Initial Org Setup or the Enterprise Module Management:

Entity RFC Order (DocumentType) with organization Org1 references an entity Return Material Sales Invoice through its property documentTypeForInvoice but this referenced entity belongs to an organization Org2 which is not part of the natural tree of Org1


I have been able to reproduce it in MPs greater than MP20 at live.builds instances.

I'm not sure whether it's a regression or not due to the random behaviour, but my feeling is that this process worked fine in the past.
Steps To Reproduce1. Create a new client running the Initial Client Setup.
   Do NOT include accounting
   IMPORTANT: do NOT include any dataset
   A confirmation message is shown. Press OK
2. Log into the new client and run an Initial Org Setup
   Org name: Org1
   Org type: generic
   Parent org: *
   Do NOT include accounting
   IMPORTANT: select dataset: Standard document types for orders, invoices, etc. and settings - Core - English (USA)
   Press OK
3. Create another organization from the Initial Org Setup
   Org name: Org2
   Org type: generic
   Parent org: *
   Do NOT include accounting
   IMPORTANT: select dataset: Standard document types for orders, invoices, etc. and settings - Core - English (USA)
   Press OK

The following error is raised:
Entity RFC Order (DocumentType) with organization Org1 references an entity Return Material Sales Invoice through its property documentTypeForInvoice but this referenced entity belongs to an organization Org2 which is not part of the natural tree of Org1


You can also try to create another organization without selecting any dataset, and after that apply the core's one at the Enterprise Module Management. A similar error appears (see attachment)
   
TagsNo tags attached.
Attached Filespng file icon dataset_permission_error.png [^] (87,866 bytes) 2013-06-05 11:31

- Relationships Relation Graph ] Dependency Graph ]
related to defect 00217163.0MP16 closedAugustoMauch REST Webservice PUT Method not find objects for * 
related to defect 0023801 closedAugustoMauch XML REST Webservices identifier property is not working 
related to defect 0023992 acknowledgedTriage Platform Base Error applying coworking dataset in Enterprise Module Management 
related to defect 00242313.0MP26 closedAugustoMauch Impossible to apply more than 2 times a dataset 

-  Notes
(0059178)
vmromanos (manager)
2013-06-05 11:36

In an ondemand machine running MP23, I'm getting a different behaviour from the one reported into the steps to reproduce section.
Instead of showing that error message, the process ends successfully but the log says that 0 rows were inserted or updated for this dataset (which is also wrong):

Processing module Core
ProcessingDataset Initial Setup
0 row/s inserted
0 row/s updated

Create reference data process completed successfully
(0059290)
AugustoMauch (manager)
2013-06-10 11:51

Test plan:
- Test that this issue is no longer reproducible
- Test that the issue 21716 is not reproducible
- Test that the issue 23801 is not reproducible
(0059291)
hgbot (developer)
2013-06-10 11:52

Repository: erp/devel/pi
Changeset: 0762572868aa6f2fa3186460a80c3cbff7cb634a
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Mon Jun 10 11:48:00 2013 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/0762572868aa6f2fa3186460a80c3cbff7cb634a [^]

Fixes issue 23990: XML is imported properly using Initial Org Setup

This is what was happening when an object with id #id was being imported from a dataset to a organization. #id is the id of the object in the dataset
- The first time the object is imported to a organization (org1), the original #id is used
- When the same record was being imported to a sister organization (org2), a query for that object with the id #id was done. The organization filter was not being applied, so the object that was imported in the previous step was found. This object was related with other objects that belonged to org1, but was being referenced too from other objects that were belonged to org2. org1 is not part of the natural tree of org2, so an exception was thrown.

This has been fixed by adding a parameter to the resolve method that will force to apply the organization filter. The default value of this parameter is false, and it will only be true then is called from the InitialSetupUtility class.

---
M src/org/openbravo/dal/xml/BaseXMLEntityConverter.java
M src/org/openbravo/dal/xml/EntityResolver.java
M src/org/openbravo/dal/xml/XMLEntityConverter.java
M src/org/openbravo/erpCommon/businessUtility/InitialSetupUtility.java
M src/org/openbravo/service/db/DataImportService.java
---
(0059295)
hgbot (developer)
2013-06-10 12:51

Repository: erp/devel/pi
Changeset: 51fcf57a7be2ae01f3781dbdf6a7bff9ead4503a
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Mon Jun 10 12:50:49 2013 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/51fcf57a7be2ae01f3781dbdf6a7bff9ead4503a [^]

Related with issue 23990: Backed out changeset 0762572868aa

The fix has been backed out because it break the automated tests

---
M src/org/openbravo/dal/xml/BaseXMLEntityConverter.java
M src/org/openbravo/dal/xml/EntityResolver.java
M src/org/openbravo/dal/xml/XMLEntityConverter.java
M src/org/openbravo/erpCommon/businessUtility/InitialSetupUtility.java
M src/org/openbravo/service/db/DataImportService.java
---
(0059331)
hgbot (developer)
2013-06-11 12:37

Repository: erp/devel/pi
Changeset: 0047a4f2ebbac184b429674b2057645cfc1be0f0
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Tue Jun 11 12:36:37 2013 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/0047a4f2ebbac184b429674b2057645cfc1be0f0 [^]

Fixes issue 23990: XML is imported properly using Initial Org Setup

Same fix as changeset 0020531, the only difference being that now it has been taking into account the class ClientImportEntityResolver, which extends EntityResolver and which needed to override also the new resolve method with 4 parameters.

---
M src/org/openbravo/dal/xml/BaseXMLEntityConverter.java
M src/org/openbravo/dal/xml/EntityResolver.java
M src/org/openbravo/dal/xml/XMLEntityConverter.java
M src/org/openbravo/erpCommon/businessUtility/InitialSetupUtility.java
M src/org/openbravo/service/db/ClientImportEntityResolver.java
M src/org/openbravo/service/db/DataImportService.java
---
(0059373)
hgbot (developer)
2013-06-11 18:29

Repository: erp/devel/pi
Changeset: 1af72d899d84ec7e8e735aeff9047c893da4e827
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Tue Jun 11 18:28:22 2013 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/1af72d899d84ec7e8e735aeff9047c893da4e827 [^]

Related to issue 23990: changed backed out because it breaks the tests

http://builds.openbravo.com/job/int-smoke-pgsql-test/992/ [^]

---
M src/org/openbravo/dal/xml/BaseXMLEntityConverter.java
M src/org/openbravo/dal/xml/EntityResolver.java
M src/org/openbravo/dal/xml/XMLEntityConverter.java
M src/org/openbravo/erpCommon/businessUtility/InitialSetupUtility.java
M src/org/openbravo/service/db/ClientImportEntityResolver.java
M src/org/openbravo/service/db/DataImportService.java
---
(0059507)
hgbot (developer)
2013-06-18 20:13

Repository: erp/devel/pi
Changeset: 83447d2c67e21ac06ca92c1d2ec432d5e9e2656a
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Tue Jun 18 20:12:58 2013 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/83447d2c67e21ac06ca92c1d2ec432d5e9e2656a [^]

Fixes issue 23990: Fix reapplied, it did not break the tests

The changeset [1] had been backed out because apparently it had broken the automated tests. The tests were broken by other changeset (already fixed), so it can be applied again.

[1] https://code.openbravo.com/erp/devel/pi/rev/0047a4f2ebbac184b429674b2057645cfc1be0f0 [^]

---
M src/org/openbravo/dal/xml/BaseXMLEntityConverter.java
M src/org/openbravo/dal/xml/EntityResolver.java
M src/org/openbravo/dal/xml/XMLEntityConverter.java
M src/org/openbravo/erpCommon/businessUtility/InitialSetupUtility.java
M src/org/openbravo/service/db/ClientImportEntityResolver.java
M src/org/openbravo/service/db/DataImportService.java
---
(0059517)
shankarb (reporter)
2013-06-19 10:15

Code reviewed and tested in pi changeset b631ef452dae.
(0059558)
hudsonbot (developer)
2013-06-20 02:07

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
(0059559)
hudsonbot (developer)
2013-06-20 02:07

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
(0059565)
hudsonbot (developer)
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
(0059570)
hudsonbot (developer)
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
(0059588)
hudsonbot (developer)
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
(0059820)
hgbot (developer)
2013-07-02 18:29

Repository: erp/devel/pi
Changeset: 7c9b6e8a8f8574a242561aa4286ba16c642b423f
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Tue Jul 02 18:27:52 2013 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/7c9b6e8a8f8574a242561aa4286ba16c642b423f [^]

Fixes issue 24231: It is possible to apply a dataset in two organizations

In the fix of the issue 23990 [1] a new parameter was added to the resolve method of the EntityResolver class, that had to be set to true when it was called when datasets are being applied. This code was included in the process called when an organization is created with datasets, but not in the Enterprise Module Management process.

[1] https://code.openbravo.com/erp/devel/pi/rev/83447d2c67e21ac06ca92c1d2ec432d5e9e2656a [^]

---
M src/org/openbravo/erpCommon/ad_forms/UpdateReferenceData.java
---
(0060012)
hudsonbot (developer)
2013-07-16 14:26

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/9a5d5983399f [^]

Maturity status: Test

- Issue History
Date Modified Username Field Change
2013-06-05 11:31 vmromanos New Issue
2013-06-05 11:31 vmromanos Assigned To => AugustoMauch
2013-06-05 11:31 vmromanos File Added: dataset_permission_error.png
2013-06-05 11:31 vmromanos Modules => Core
2013-06-05 11:31 vmromanos Triggers an Emergency Pack => No
2013-06-05 11:36 vmromanos Note Added: 0059178
2013-06-05 12:33 vmromanos Relationship added related to 0023992
2013-06-10 11:48 AugustoMauch Issue Monitored: shankarb
2013-06-10 11:48 AugustoMauch Review Assigned To => shankarb
2013-06-10 11:49 AugustoMauch Relationship added related to 0021716
2013-06-10 11:50 AugustoMauch Relationship added related to 0023801
2013-06-10 11:51 AugustoMauch Note Added: 0059290
2013-06-10 11:52 hgbot Checkin
2013-06-10 11:52 hgbot Note Added: 0059291
2013-06-10 11:52 hgbot Status new => resolved
2013-06-10 11:52 hgbot Resolution open => fixed
2013-06-10 11:52 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/0762572868aa6f2fa3186460a80c3cbff7cb634a [^]
2013-06-10 12:51 hgbot Checkin
2013-06-10 12:51 hgbot Note Added: 0059295
2013-06-10 12:51 AugustoMauch Status resolved => new
2013-06-10 12:51 AugustoMauch Resolution fixed => open
2013-06-10 17:28 ngarcia Issue Monitored: ngarcia
2013-06-11 12:37 hgbot Checkin
2013-06-11 12:37 hgbot Note Added: 0059331
2013-06-11 12:37 hgbot Status new => resolved
2013-06-11 12:37 hgbot Resolution open => fixed
2013-06-11 12:37 hgbot Fixed in SCM revision http://code.openbravo.com/erp/devel/pi/rev/0762572868aa6f2fa3186460a80c3cbff7cb634a [^] => http://code.openbravo.com/erp/devel/pi/rev/0047a4f2ebbac184b429674b2057645cfc1be0f0 [^]
2013-06-11 18:29 hgbot Checkin
2013-06-11 18:29 hgbot Note Added: 0059373
2013-06-11 18:30 AugustoMauch Status resolved => new
2013-06-11 18:30 AugustoMauch Resolution fixed => open
2013-06-18 20:13 hgbot Checkin
2013-06-18 20:13 hgbot Note Added: 0059507
2013-06-18 20:13 hgbot Status new => resolved
2013-06-18 20:13 hgbot Resolution open => fixed
2013-06-18 20:13 hgbot Fixed in SCM revision http://code.openbravo.com/erp/devel/pi/rev/0047a4f2ebbac184b429674b2057645cfc1be0f0 [^] => http://code.openbravo.com/erp/devel/pi/rev/83447d2c67e21ac06ca92c1d2ec432d5e9e2656a [^]
2013-06-19 10:15 shankarb Note Added: 0059517
2013-06-19 10:15 shankarb Status resolved => closed
2013-06-19 10:15 shankarb Fixed in Version => 3.0MP25
2013-06-20 02:07 hudsonbot Checkin
2013-06-20 02:07 hudsonbot Note Added: 0059558
2013-06-20 02:07 hudsonbot Checkin
2013-06-20 02:07 hudsonbot Note Added: 0059559
2013-06-20 02:08 hudsonbot Checkin
2013-06-20 02:08 hudsonbot Note Added: 0059565
2013-06-20 02:08 hudsonbot Checkin
2013-06-20 02:08 hudsonbot Note Added: 0059570
2013-06-20 02:08 hudsonbot Checkin
2013-06-20 02:08 hudsonbot Note Added: 0059588
2013-07-02 18:22 AugustoMauch Relationship added related to 0024231
2013-07-02 18:29 hgbot Checkin
2013-07-02 18:29 hgbot Note Added: 0059820
2013-07-16 14:26 hudsonbot Checkin
2013-07-16 14:26 hudsonbot Note Added: 0060012


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker