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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0051547
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Retail Modules] Retail APImajorhave not tried2023-02-09 10:332023-02-16 13:28
Reporternicola_uvaView Statuspublic 
Assigned Tocaristu 
PriorityimmediateResolutionfixedFixed in Version
StatusclosedFix in branchFixed in SCM revision
ProjectionnoneETAnoneTarget Versionpi
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionpiSCM revision 
Review Assigned To
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0051547: PriceList API - Product price is wrongly added when same products searchKey on different Orgs are in OB backoffice

DescriptionProduct price is wrongly added when same products searchKey on different Orgs are in defined OB backoffice. (see step to reproduce)
Steps To Reproduce1) 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.
TagsNo tags attached.
Attached Filestxt file icon priceListRequest.txt [^] (534 bytes) 2023-02-09 10:55 [Show Content]

- Relationships Relation Graph ] Dependency Graph ]
related to defect 0048780 closedcaristu 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 0051553pi closedvmromanos Retail Modules Inventory API - When we have 2 products same searckey on different organization, we cannot do an inventory 
related to defect 0051628 closedcaristu Modules OSP.getBOBInClosestOrg should return null when no bob is found in the natural tree of the organization 

-  Notes
(0146309)
hgbot (developer)
2023-02-09 12:56

Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.service.external.integration/-/merge_requests/31 [^]
(0146355)
hgbot (developer)
2023-02-10 10:15

Merge Request created: https://gitlab.com/openbravo/ci/modules/org.openbravo.service.external.integration.tests/-/merge_requests/18 [^]
(0146358)
hgbot (developer)
2023-02-10 10:44

Merge Request created: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/821 [^]
(0146360)
hgbot (developer)
2023-02-10 11:01

Repository: https://gitlab.com/openbravo/product/openbravo [^]
Changeset: b81166bc38a888fdf6e043d0bbd1fedc7c632bf8
Author: Carlos Aristu <carlos.aristu@openbravo.com>
Date: 10-02-2023 10:01:02
URL: https://gitlab.com/openbravo/product/openbravo/-/commit/b81166bc38a888fdf6e043d0bbd1fedc7c632bf8 [^]

related to BUG-51547: OSP method to retrieve from a collection the BOB closest to an org

---
M src/org/openbravo/dal/security/OrganizationStructureProvider.java
---
(0146361)
hgbot (developer)
2023-02-10 11:01

Merge request merged: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/821 [^]
(0146362)
hgbot (developer)
2023-02-10 11:04

Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.service.external.integration/-/merge_requests/31 [^]
(0146363)
hgbot (developer)
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 (developer)
2023-02-10 11:08

Repository: https://gitlab.com/openbravo/ci/modules/org.openbravo.service.external.integration.tests [^]
Changeset: 45506f7d7f2009e04a7fd00026e40f504d43c5e2
Author: Carlos Aristu <carlos.aristu@openbravo.com>
Date: 10-02-2023 10:08:11
URL: https://gitlab.com/openbravo/ci/modules/org.openbravo.service.external.integration.tests/-/commit/45506f7d7f2009e04a7fd00026e40f504d43c5e2 [^]

related to BUG-51547: add test case

---
M src-db/database/sourcedata/OBEI_ENTITY_MAPPING.xml
M src-db/database/sourcedata/OBEI_PROP_MAP_INSTANCE.xml
M src-test/org/openbravo/service/external/integration/test/_import/PriceListImportTest.java
---
(0146365)
hgbot (developer)
2023-02-10 11:08

Merge request merged: https://gitlab.com/openbravo/ci/modules/org.openbravo.service.external.integration.tests/-/merge_requests/18 [^]
(0146366)
hgbot (developer)
2023-02-10 11:20

Repository: https://gitlab.com/openbravo/ci/modules/org.openbravo.service.external.integration.tests [^]
Changeset: a8296b0b667b30fd0a736c91e88dce74a6849f25
Author: Carlos Aristu <carlos.aristu@openbravo.com>
Date: 10-02-2023 11:19:53
URL: https://gitlab.com/openbravo/ci/modules/org.openbravo.service.external.integration.tests/-/commit/a8296b0b667b30fd0a736c91e88dce74a6849f25 [^]

related to BUG-51547: use better variable name

---
M src-test/org/openbravo/service/external/integration/test/_import/PriceListImportTest.java
---
(0146387)
hgbot (developer)
2023-02-10 14:26

Merge Request created: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/823 [^]
(0146389)
hgbot (developer)
2023-02-10 14:46

Repository: https://gitlab.com/openbravo/product/openbravo [^]
Changeset: d77665f0baaaa46c24d58799f264af20b74adb33
Author: Asier Lostalé <asier.lostale@openbravo.com>
Date: 10-02-2023 14:24:53
URL: https://gitlab.com/openbravo/product/openbravo/-/commit/d77665f0baaaa46c24d58799f264af20b74adb33 [^]

related to ISSUE-51547: makes use of generics in OSP API

---
M src/org/openbravo/dal/security/OrganizationStructureProvider.java
---
(0146390)
hgbot (developer)
2023-02-10 14:46

Merge request merged: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/823 [^]
(0146392)
hgbot (developer)
2023-02-10 15:02

Repository: https://gitlab.com/openbravo/product/openbravo [^]
Changeset: 5861ec21d7ec657adc136f1eac594c07d6b3ca3a
Author: Carlos Aristu <carlos.aristu@openbravo.com>
Date: 10-02-2023 15:01:49
URL: https://gitlab.com/openbravo/product/openbravo/-/commit/5861ec21d7ec657adc136f1eac594c07d6b3ca3a [^]

related to ISSUE-51547: javadoc improvements

---
M src/org/openbravo/dal/security/OrganizationStructureProvider.java
---

- 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 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 View Revisions
2023-02-09 10:54 marvintm Steps to Reproduce Updated View Revisions
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 View Revisions
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 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 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


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker