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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0023801
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] A. Platformmajorhave not tried2013-05-13 10:342013-05-23 01:33
ReportercaristuView Statuspublic 
Assigned ToAugustoMauch 
PriorityimmediateResolutionfixedFixed in Version3.0MP24
StatusclosedFix in branchpiFixed in SCM revisiond41072c387c4
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Toshankarb
Web browser
ModulesCore
Regression levelProduction - Confirmed Stable
Regression date2013-01-08
Regression introduced in release
Regression introduced by commithttps://code.openbravo.com/erp/devel/pi/rev/8525372a1fce7047ee3baead23e1ddfc208b6dd9 [^]
Triggers an Emergency PackNo
Summary

0023801: XML REST Webservices identifier property is not working

DescriptionIs not possible to create new entities trough web services if we try to insert several entities in the same web service call.

To achieve this, the identifier property is used to refer another entity inside the very same web service call definition, (for example an invoice header and a line of the same invoice)
Steps To Reproduce1) Use poster plugin to make a call to the AttributeSetInstance web service (for example, http://localhost:8080/openbravo/ws/dal/AttributeSetInstance [^]) using the attached xml definition.
TagsNo tags attached.
Attached Filesxml file icon xmlDefiniton.xml [^] (2,131 bytes) 2013-05-13 10:34

- Relationships Relation Graph ] Dependency Graph ]
related to defect 0022738 closeddmiguelez Organization level datasets applied to different organizations 
related to defect 00217163.0MP16 closedAugustoMauch REST Webservice PUT Method not find objects for * 
related to defect 0023990 closedAugustoMauch Permission error when applying datasets 

-  Notes
(0058642)
hgbot (developer)
2013-05-14 16:57

Repository: erp/devel/pi
Changeset: a5e71dc5836451a60450cadf3d972e9bcb30e859
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Tue May 14 10:58:14 2013 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/a5e71dc5836451a60450cadf3d972e9bcb30e859 [^]

Related to issue 23801: Restore previous resolving mode after DALWebService

The original resolving mode of the EntityResolver is ResolvingMode.ALLOW_NOT_EXIST. The DalWebService changes it to ResolvingMode.MUST_EXIST if the change action is ChangeAction.UPDATE, but it never reverts it to its previous mode.

---
M src/org/openbravo/dal/xml/EntityResolver.java
M src/org/openbravo/service/rest/DalWebService.java
---
(0058643)
hgbot (developer)
2013-05-14 16:57

Repository: erp/devel/pi
Changeset: d41072c387c44632a7ec7a48d3662a663a4555a5
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Tue May 14 16:54:34 2013 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/d41072c387c44632a7ec7a48d3662a663a4555a5 [^]

Fixes issue 23801:Inserting several entities in one web service call works

It was not possible to insert in a same web service call an entity and one child. To support this, the classes DalWebService and EntityResolver have been modified. The approach using the lookForTranslatedIDs [1] has been reverted. Now, the EntityResolver.resolve method first tries to resolve the entity as it used to do it before the regression was introduced, and if it does not find the entity then it tries to fetch it using an OBCriteria without applying the organization filter, so that this issue [2] is not reproduced.

A new function has been created to search for the entity. It accepts a boolean that will be used to specify if the organization filter should be applied. The old doSearch method calls the new method passing true to this flag, so it keeps working as usual.

[1] https://code.openbravo.com/erp/devel/pi/rev/8525372a1fce7047ee3baead23e1ddfc208b6dd9 [^]
[2] https://issues.openbravo.com/view.php?id=21716 [^]

---
M src/org/openbravo/dal/xml/EntityResolver.java
M src/org/openbravo/service/rest/DalWebService.java
---
(0058644)
AugustoMauch (manager)
2013-05-14 17:11
edited on: 2013-05-14 17:13

Test plan:
First, install the Firefox Poster add on.

Check that the issue https://issues.openbravo.com/view.php?id=19974 [^] keeps working. For that:
- Open Openbravo and set '*' as the default organization.
- Open the Firefox Poster and enter this data:
URL: http://localhost:8080/openbravo/ws/dal/BusinessPartner [^]
User Auth: your login and password
Content:

<?xml version="1.0" encoding="UTF-8"?>
<ob:Openbravo xmlns:ob="http://www.openbravo.com"> [^] [^]
<BusinessPartner id="A6750F0D15334FB890C254369AC750A8">
  <name>Alimentos y Supermercados, S.A Nuevo Nombre</name>
</BusinessPartner>
</ob:Openbravo>

Press the PUSH button. The business partner should be updated.

(0058645)
AugustoMauch (manager)
2013-05-14 17:13

Test plan (cont):

- Open the Firefox Poster
URL: http://localhost:8080/openbravo/ws/dal/BusinessPartner [^] [^]
User Auth: your login and password
Content:

<ob:Openbravo xmlns:ob="http://www.openbravo.com" [^] xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> [^]
    <BusinessPartnerCategory id="B9EB1CD0981B49AAB43AE75D3F0420AM" identifier="aaa">
        <id>B9EB1CD0981B49AAB43AE75D3F0420AM</id>
        <client id="23C59575B9CF467C9620760EB255B389" entity-name="ADClient" identifier="AA" />
        <organization id="E443A31992CB4635AFCAEABE7183CE85" entity-name="Organization" identifier="BB" />
        <active>true</active>
        <creationDate transient="true">2013-05-09T12:53:56.521Z</creationDate>
        <createdBy transient="true" id="100" entity-name="ADUser" identifier="Openbravo" />
        <updated transient="true">2013-05-09T12:53:56.521Z</updated>
        <updatedBy transient="true" id="100" entity-name="ADUser" identifier="Openbravo" />
                <searchKey>TC4</searchKey>
                <name>Test Category4</name>
    </BusinessPartnerCategory>

<BusinessPartner id="A6750F0D15334FB890C254369AC750A9">
        <id>A6750F0D15334FB890C254369AC750A9</id>
        <client id="23C59575B9CF467C9620760EB255B389" entity-name="ADClient" identifier="AA" />
        <organization id="E443A31992CB4635AFCAEABE7183CE85" entity-name="Organization" identifier="BB" />
        <active>true</active>
        <creationDate transient="true">2013-05-09T12:53:56.521Z</creationDate>
        <createdBy transient="true" id="100" entity-name="ADUser" identifier="Openbravo" />
        <updated transient="true">2013-05-09T12:53:56.521Z</updated>
        <updatedBy transient="true" id="100" entity-name="ADUser" identifier="Openbravo" />
                <searchKey>TCB4</searchKey>
                <name>Test BP4</name>
                <businessPartnerCategory id="B9EB1CD0981B49AAB43AE75D3F0420AM" entity-name="BusinessPartnerCategory" identifier="aaa"/>
</BusinessPartner>
</ob:Openbravo>

Press the POST button. The business partner category and the business partner should be added.
(0058646)
hgbot (developer)
2013-05-14 18:16

Repository: erp/devel/pi
Changeset: 8444cd29ae958dad86b9575e1ae6f7548fbf7a04
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Tue May 14 18:15:58 2013 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/8444cd29ae958dad86b9575e1ae6f7548fbf7a04 [^]

Related to bug 23801: Deprecates setLookForTranslatedIDs so API is not broken

---
M src/org/openbravo/dal/xml/EntityResolver.java
---
(0058652)
shankarb (reporter)
2013-05-15 09:44

Code reviewed and verified in pi changeset be142dce89dd.
(0058813)
hudsonbot (developer)
2013-05-23 01:33

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/97c7f6256af7 [^]

Maturity status: Test
(0058814)
hudsonbot (developer)
2013-05-23 01:33

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/97c7f6256af7 [^]

Maturity status: Test
(0058815)
hudsonbot (developer)
2013-05-23 01:33

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/97c7f6256af7 [^]

Maturity status: Test

- Issue History
Date Modified Username Field Change
2013-05-13 10:34 caristu New Issue
2013-05-13 10:34 caristu Assigned To => AugustoMauch
2013-05-13 10:34 caristu File Added: xmlDefiniton.xml
2013-05-13 10:34 caristu Modules => Core
2013-05-13 10:34 caristu Triggers an Emergency Pack => No
2013-05-13 10:34 caristu Issue Monitored: networkb
2013-05-13 10:36 caristu Regression level => Production - Confirmed Stable
2013-05-13 10:36 caristu Regression date => 2013-01-08
2013-05-13 10:36 caristu Regression introduced by commit => https://code.openbravo.com/erp/devel/pi/rev/8525372a1fce7047ee3baead23e1ddfc208b6dd9 [^]
2013-05-13 15:52 AugustoMauch Relationship added related to 0022738
2013-05-13 15:53 AugustoMauch Relationship added related to 0021716
2013-05-14 16:54 AugustoMauch Issue Monitored: shankarb
2013-05-14 16:55 AugustoMauch Review Assigned To => shankarb
2013-05-14 16:57 hgbot Checkin
2013-05-14 16:57 hgbot Note Added: 0058642
2013-05-14 16:57 hgbot Checkin
2013-05-14 16:57 hgbot Note Added: 0058643
2013-05-14 16:57 hgbot Status new => resolved
2013-05-14 16:57 hgbot Resolution open => fixed
2013-05-14 16:57 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/d41072c387c44632a7ec7a48d3662a663a4555a5 [^]
2013-05-14 17:11 AugustoMauch Note Added: 0058644
2013-05-14 17:13 AugustoMauch Note Added: 0058645
2013-05-14 17:13 AugustoMauch Status resolved => new
2013-05-14 17:13 AugustoMauch Resolution fixed => open
2013-05-14 17:13 AugustoMauch Note Edited: 0058644 View Revisions
2013-05-14 17:13 AugustoMauch Status new => scheduled
2013-05-14 17:13 AugustoMauch fix_in_branch => pi
2013-05-14 17:13 AugustoMauch Status scheduled => resolved
2013-05-14 17:13 AugustoMauch Resolution open => fixed
2013-05-14 18:16 hgbot Checkin
2013-05-14 18:16 hgbot Note Added: 0058646
2013-05-15 09:44 shankarb Note Added: 0058652
2013-05-15 09:44 shankarb Status resolved => closed
2013-05-15 09:44 shankarb Fixed in Version => 3.0MP24
2013-05-23 01:33 hudsonbot Checkin
2013-05-23 01:33 hudsonbot Note Added: 0058813
2013-05-23 01:33 hudsonbot Checkin
2013-05-23 01:33 hudsonbot Note Added: 0058814
2013-05-23 01:33 hudsonbot Checkin
2013-05-23 01:33 hudsonbot Note Added: 0058815
2013-06-10 11:50 AugustoMauch Relationship added related to 0023990


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker