Openbravo Issue Tracking System - Retail Modules |
View Issue Details |
|
ID | Project | Category | View Status | Date Submitted | Last Update |
0051547 | Retail Modules | Retail API | public | 2023-02-09 10:33 | 2023-02-16 13:28 |
|
Reporter | nicola_uva | |
Assigned To | caristu | |
Priority | immediate | Severity | major | Reproducibility | have not tried |
Status | closed | Resolution | fixed | |
Platform | | OS | 5 | OS Version | |
Product Version | pi | |
Target Version | pi | Fixed in Version | | |
Merge Request Status | approved |
Review Assigned To | |
OBNetwork customer | Gold |
Support ticket | |
Regression level | |
Regression date | |
Regression introduced in release | |
Regression introduced by commit | |
Triggers an Emergency Pack | No |
|
Summary | 0051547: PriceList API - Product price is wrongly added when same products searchKey on different Orgs are in OB backoffice |
Description | Product price is wrongly added when same products searchKey on different Orgs are in defined OB backoffice. (see step to reproduce) |
Steps To Reproduce | 1) Configure in the backoffice 2 products with same searchkey and different orgs
1.1) product search key 123, name "Product 1" org *
1.2) product search key 123, name "Product 2", org "Vall Blanca Store"
2) Execute a call to the "PriceList" API endpoint, to create a price for a pricelist defined in "Vall Blanca Store", for the product with search key "123"
3) In the backoffice the product price is added to the product "Product 1", on * organization
4) error-> product price must added to the Product 2 in organization "Vall Blanca", which is the one closer in the natural organization tree. |
Proposed Solution | |
Additional Information | |
Tags | No tags attached. |
Relationships | related to | defect | 0048780 | | closed | caristu | Retail Modules | It is not possible to create or modify a product if there exist 2 product categories with the same searchkey | related to | defect | 0051553 | pi | closed | vmromanos | Retail Modules | Inventory API - When we have 2 products same searckey on different organization, we cannot do an inventory | related to | defect | 0051628 | | closed | caristu | Modules | OSP.getBOBInClosestOrg should return null when no bob is found in the natural tree of the organization |
|
Attached Files | priceListRequest.txt (534) 2023-02-09 10:55 https://issues.openbravo.com/file_download.php?file_id=18105&type=bug |
|
Issue History |
Date Modified | Username | Field | Change |
2023-02-09 10:33 | nicola_uva | New Issue | |
2023-02-09 10:33 | nicola_uva | Assigned To | => caristu |
2023-02-09 10:33 | nicola_uva | File Added: priceListRequest.txt | |
2023-02-09 10:33 | nicola_uva | OBNetwork customer | => Gold |
2023-02-09 10:33 | nicola_uva | Triggers an Emergency Pack | => No |
2023-02-09 10:54 | marvintm | Summary | PriceList API - Product price is wrong added when same products searchKey on different Orgs are in OB backoffice => PriceList API - Product price is wrongly added when same products searchKey on different Orgs are in OB backoffice |
2023-02-09 10:54 | marvintm | Description Updated | bug_revision_view_page.php?rev_id=25506#r25506 |
2023-02-09 10:54 | marvintm | Steps to Reproduce Updated | bug_revision_view_page.php?rev_id=25508#r25508 |
2023-02-09 10:55 | marvintm | File Deleted: priceListRequest.txt | |
2023-02-09 10:55 | marvintm | File Added: priceListRequest.txt | |
2023-02-09 10:57 | marvintm | Steps to Reproduce Updated | bug_revision_view_page.php?rev_id=25509#r25509 |
2023-02-09 10:58 | marvintm | Severity | critical => major |
2023-02-09 11:00 | alostale | Relationship added | related to 0048780 |
2023-02-09 12:56 | hgbot | Merge Request Status | => open |
2023-02-09 12:56 | hgbot | Note Added: 0146309 | |
2023-02-09 17:33 | vmromanos | Relationship added | related to 0051553 |
2023-02-10 10:15 | hgbot | Note Added: 0146355 | |
2023-02-10 10:44 | hgbot | Note Added: 0146358 | |
2023-02-10 10:57 | hgbot | Merge Request Status | open => approved |
2023-02-10 11:01 | hgbot | Note Added: 0146360 | |
2023-02-10 11:01 | hgbot | Note Added: 0146361 | |
2023-02-10 11:04 | hgbot | Note Added: 0146362 | |
2023-02-10 11:04 | hgbot | Resolution | open => fixed |
2023-02-10 11:04 | hgbot | Status | new => closed |
2023-02-10 11:04 | hgbot | Note Added: 0146363 | |
2023-02-10 11:08 | hgbot | Note Added: 0146364 | |
2023-02-10 11:08 | hgbot | Note Added: 0146365 | |
2023-02-10 11:20 | hgbot | Note Added: 0146366 | |
2023-02-10 14:26 | hgbot | Note Added: 0146387 | |
2023-02-10 14:46 | hgbot | Note Added: 0146389 | |
2023-02-10 14:46 | hgbot | Note Added: 0146390 | |
2023-02-10 15:02 | hgbot | Note Added: 0146392 | |
2023-02-16 13:28 | caristu | Issue cloned | 0051628 |
2023-02-16 13:28 | caristu | Relationship added | related to 0051628 |
Notes |
|
(0146309)
|
hgbot
|
2023-02-09 12:56
|
|
|
|
(0146355)
|
hgbot
|
2023-02-10 10:15
|
|
|
|
(0146358)
|
hgbot
|
2023-02-10 10:44
|
|
|
|
(0146360)
|
hgbot
|
2023-02-10 11:01
|
|
|
|
(0146361)
|
hgbot
|
2023-02-10 11:01
|
|
|
|
(0146362)
|
hgbot
|
2023-02-10 11:04
|
|
|
|
(0146363)
|
hgbot
|
2023-02-10 11:04
|
|
Directly closing issue as related merge request is already approved.
Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.service.external.integration [^]
Changeset: c6ed6a3c628aa7dddee9a6833891a2e4c85e94b7
Author: Carlos Aristu <carlos.aristu@openbravo.com>
Date: 10-02-2023 10:47:06
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.service.external.integration/-/commit/c6ed6a3c628aa7dddee9a6833891a2e4c85e94b7 [^]
fixes BUG-51547: the expected referenced record is not found in some cases
When we have two referenced records with match with the searching
criteria, the selected record was being taken in an arbitrary way. Now
we take into account the organization of the parent record to retrieve
the "closest" record, with the following criteria:
1- First we take the closest record in the parent list, if multiple
records are found then we sort them by ID and return the first one.
2- If no records are found at the first step, then we select the record
whose organization is present in the child tree. Here it does not make
sense to consider the distance, because we can have multiple records
with the same distance due to the ramifications that the child tree may
have. If multiple records are found, then we sort them by ID and return
the first one.
3- If still we have not selected any record after these two steps,
which may be the case of the cross organization references, then we just
sort the candidate records by its ID and return the first one.
---
M src/org/openbravo/service/external/integration/mapping/DirectPropertyMapping.java
---
|
|
|
(0146364)
|
hgbot
|
2023-02-10 11:08
|
|
|
|
(0146365)
|
hgbot
|
2023-02-10 11:08
|
|
|
|
(0146366)
|
hgbot
|
2023-02-10 11:20
|
|
|
|
(0146387)
|
hgbot
|
2023-02-10 14:26
|
|
|
|
(0146389)
|
hgbot
|
2023-02-10 14:46
|
|
|
|
(0146390)
|
hgbot
|
2023-02-10 14:46
|
|
|
|
(0146392)
|
hgbot
|
2023-02-10 15:02
|
|
|