Openbravo Issue Tracking System - Openbravo ERP |
View Issue Details |
|
ID | Project | Category | View Status | Date Submitted | Last Update |
0023801 | Openbravo ERP | A. Platform | public | 2013-05-13 10:34 | 2013-05-23 01:33 |
|
Reporter | caristu | |
Assigned To | AugustoMauch | |
Priority | immediate | Severity | major | Reproducibility | have not tried |
Status | closed | Resolution | fixed | |
Platform | | OS | 5 | OS Version | |
Product Version | | |
Target Version | | Fixed in Version | 3.0MP24 | |
Merge Request Status | |
Review Assigned To | shankarb |
OBNetwork customer | |
Web browser | |
Modules | Core |
Support ticket | |
Regression level | Production - Confirmed Stable |
Regression date | 2013-01-08 |
Regression introduced in release | |
Regression introduced by commit | https://code.openbravo.com/erp/devel/pi/rev/8525372a1fce7047ee3baead23e1ddfc208b6dd9 [^] |
Triggers an Emergency Pack | No |
|
Summary | 0023801: XML REST Webservices identifier property is not working |
Description | Is 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 Reproduce | 1) 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. |
Proposed Solution | |
Additional Information | |
Tags | No tags attached. |
Relationships | related to | defect | 0022738 | | closed | dmiguelez | Organization level datasets applied to different organizations | related to | defect | 0021716 | 3.0MP16 | closed | AugustoMauch | REST Webservice PUT Method not find objects for * | related to | defect | 0023990 | | closed | AugustoMauch | Permission error when applying datasets |
|
Attached Files | xmlDefiniton.xml (2,131) 2013-05-13 10:34 https://issues.openbravo.com/file_download.php?file_id=6129&type=bug |
|
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 | bug_revision_view_page.php?bugnote_id=0058644#r4717 |
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 |
Notes |
|
(0058642)
|
hgbot
|
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
|
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
|
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.
|
|
|
|
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
|
2013-05-14 18:16
|
|
|
|
(0058652)
|
shankarb
|
2013-05-15 09:44
|
|
Code reviewed and verified in pi changeset be142dce89dd. |
|
|
|
|
|
|
|
|
|
|