Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0057668 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
defect | [POS2] POS | minor | always | 2025-01-16 15:22 | 2025-02-19 06:18 | |||
Reporter | sofia_rodriguez | View Status | public | |||||
Assigned To | Bimla_vm | |||||||
Priority | high | Resolution | fixed | Fixed in Version | ||||
Status | closed | Fix in branch | Fixed in SCM revision | |||||
Projection | none | ETA | none | Target Version | ||||
OS | Any | Database | Any | Java version | ||||
OS Version | Database version | Ant version | ||||||
Product Version | SCM revision | |||||||
Review Assigned To | ||||||||
Regression level | ||||||||
Regression date | ||||||||
Regression introduced in release | ||||||||
Regression introduced by commit | ||||||||
Triggers an Emergency Pack | No | |||||||
Summary | 0057668: Product integration fails while trying to assign a char value of a duplicated characteristic | |||||||
Description | In the back end, there are no restrictions to create a duplicated characteristic (two registers with the same name) The main problem happens when we try to integrate a product and we want to assign a characteristic value that belongs to the duplicated characteristic The integration is not prepared to support this case and fails in the query that gets the characteristic by name | |||||||
Steps To Reproduce | Steps to reproduce: 1. Go to the BO 2. Open the window Product characteristics 3. Create a duplicated characteristic with some values 4. Using the Product API, integrate a product assigning a Product Characteristic created in the previous step (https://livebuilds.openbravo.com/context/retail_pos2_modules_pgsql/api#/Product/Import_Product [^]) | |||||||
Proposed Solution | In ImportProductJavaPropertyMappingHandler.java: It is desired to have a setMaxResults in here From private Characteristic getCharacteristicByName(String charName) { OBCriteria<Characteristic> criteria = OBDal.getInstance().createCriteria(Characteristic.class); criteria.add(Restrictions.eq("name", charName)); return (Characteristic) criteria.uniqueResult(); } To private Characteristic getCharacteristicByName(String charName) { OBCriteria<Characteristic> criteria = OBDal.getInstance().createCriteria(Characteristic.class); criteria.add(Restrictions.eq("name", charName)); criteria.setMaxResults(1); return (Characteristic) criteria.uniqueResult(); } | |||||||
Tags | No tags attached. | |||||||
Attached Files | ![]() | |||||||
![]() |
|
![]() |
|
(0174251) guillermogil (developer) 2025-01-17 06:03 |
Changed to FR, this is how characteristics have been defined in the product. In case the behavior is wanted to be changed please raise it to PrM so they can review the request |
(0175112) kchoperena (developer) 2025-02-04 18:00 |
Not agree with this as we notice it in the Product Integration when we try to assign a characteristic-value . It is searching by Name the characteristic but as there is more than one defined with the same name the integration fails We can consider a design defect and I understand that as the change is big enough to manage it as a task in JIRA makes sense to plan it but as part of the roadmap |
(0175209) guillermogil (developer) 2025-02-06 10:36 |
It is desired to have a setMaxResults in here From private Characteristic getCharacteristicByName(String charName) { OBCriteria<Characteristic> criteria = OBDal.getInstance().createCriteria(Characteristic.class); criteria.add(Restrictions.eq("name", charName)); return (Characteristic) criteria.uniqueResult(); } To private Characteristic getCharacteristicByName(String charName) { OBCriteria<Characteristic> criteria = OBDal.getInstance().createCriteria(Characteristic.class); criteria.add(Restrictions.eq("name", charName)); criteria.setMaxResults(1); return (Characteristic) criteria.uniqueResult(); } |
(0175836) hgbot (developer) 2025-02-19 06:13 |
Merge Request created: https://gitlab.com/orisha-group/bu-commerce/openbravo/product/pmods/org.openbravo.api/-/merge_requests/432 [^] |
(0175838) hgbot (developer) 2025-02-19 06:18 |
Directly closing issue as related merge request is already approved. Repository: https://gitlab.com/orisha-group/bu-commerce/openbravo/product/pmods/org.openbravo.api [^] Changeset: d6732ffb31699cf7204e5c7a27a62328c045237e Author: Bimla V Mayavan <b.mayavan@external.orisha.com> Date: 18-02-2025 18:35:54 URL: https://gitlab.com/orisha-group/bu-commerce/openbravo/product/pmods/org.openbravo.api/-/commit/d6732ffb31699cf7204e5c7a27a62328c045237e [^] Fixed ISSUE-57668: Added setMaxResults in criteria to avoid duplicated characteristic --- M src/org/openbravo/api/mappings/product/ImportProductJavaPropertyMappingHandler.java --- |
(0175839) hgbot (developer) 2025-02-19 06:18 |
Merge request merged: https://gitlab.com/orisha-group/bu-commerce/openbravo/product/pmods/org.openbravo.api/-/merge_requests/432 [^] |
![]() |
|||
Date Modified | Username | Field | Change |
2025-01-16 15:22 | sofia_rodriguez | New Issue | |
2025-01-16 15:22 | sofia_rodriguez | Assigned To | => Retail |
2025-01-16 15:22 | sofia_rodriguez | File Added: image-20250116-112724.png | |
2025-01-16 15:22 | sofia_rodriguez | Triggers an Emergency Pack | => No |
2025-01-17 05:20 | jorgewederago | Assigned To | Retail => fofarril |
2025-01-17 05:20 | jorgewederago | Status | new => acknowledged |
2025-01-17 06:03 | guillermogil | Note Added: 0174251 | |
2025-01-17 06:03 | guillermogil | Type | defect => feature request |
2025-01-17 06:03 | guillermogil | Assigned To | fofarril => Retail |
2025-01-17 06:03 | guillermogil | Status | acknowledged => scheduled |
2025-01-17 06:04 | guillermogil | Status | scheduled => resolved |
2025-01-17 06:04 | guillermogil | Resolution | open => fixed |
2025-01-17 06:04 | guillermogil | Status | resolved => new |
2025-01-17 06:04 | guillermogil | Resolution | fixed => open |
2025-02-04 18:00 | kchoperena | Note Added: 0175112 | |
2025-02-06 10:36 | guillermogil | Note Added: 0175209 | |
2025-02-06 10:36 | guillermogil | Severity | major => minor |
2025-02-06 10:36 | guillermogil | Type | feature request => defect |
2025-02-06 10:36 | guillermogil | Proposed Solution updated | |
2025-02-06 10:37 | guillermogil | Assigned To | Retail => jorgewederago |
2025-02-06 10:58 | kchoperena | Summary | The back office allows to register characteristics with the same name => Product integration fails while trying to assign a char value of a duplicated characteristic |
2025-02-06 10:58 | kchoperena | Description Updated | View Revisions |
2025-02-06 10:58 | kchoperena | Steps to Reproduce Updated | View Revisions |
2025-02-06 10:58 | kchoperena | Proposed Solution updated | |
2025-02-13 14:56 | guillermogil | Status | new => acknowledged |
2025-02-18 08:27 | Bimla_vm | Assigned To | jorgewederago => Bimla_vm |
2025-02-18 08:27 | Bimla_vm | Status | acknowledged => scheduled |
2025-02-19 06:13 | hgbot | Note Added: 0175836 | |
2025-02-19 06:18 | hgbot | Resolution | open => fixed |
2025-02-19 06:18 | hgbot | Status | scheduled => closed |
2025-02-19 06:18 | hgbot | Note Added: 0175838 | |
2025-02-19 06:18 | hgbot | Note Added: 0175839 |
Copyright © 2000 - 2009 MantisBT Group |