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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0055222
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Retail Modules] Retail APImajorhave not tried2024-04-17 14:302024-09-18 07:25
Reporterazzeddine_meftohView Statuspublic 
Assigned Toalostale 
PriorityhighResolutionfixedFixed in Version
StatusclosedFix in branchFixed in SCM revision
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionmainSCM revision 
Review Assigned To
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0055222: Price API - importing price for deactivated product

DescriptionWhen importing a price for a deativated product we get the error :
ERROR: duplicate key value violates unique constraint "m_productprice_pricelist_ve_un"
Steps To ReproduceImport a price for a product with the API
Deactivate the product
Import against a price for this product with the API for the same pricelist version
Proposed SolutionRemove filters for active products
TagsNo tags attached.
Attached Files? file icon issue55222-lb.mkv [^] (1,904,785 bytes) 2024-09-03 13:36
? file icon request.json [^] (1,802 bytes) 2024-09-03 15:37

- Relationships Relation Graph ] Dependency Graph ]
related to defect 0053912 closedSABARINATH P Retail Modules API PriceList ERROR updating inactive product 
related to defect 0056207 closedalostale Modules Pricelist API : The product price active flag is not updated 

-  Notes
(0163352)
adrianromero (manager)
2024-04-18 10:37

This is the expected behaviour when trying to import any Openbravo entity with the same keys as another existing deactivated entity.

Deactivated entities are maintanined in the database for reference and reporting purposes but cannot be used in new processes or selected, etc... and as consequence:

* Deactivated records cannot be updated by the import API and kept deactivated
* Deactivated records cannot be reactivated and updated as a result of an import API request
* Openbravo cannot create a new activated record due the database constraints that can end in an inconsistent database with two records with the same keys, one activated and the other deactivated.
(0166405)
marvintm (manager)
2024-06-27 09:39

After further discussion, it is clear that this is a problem when trying to use the API to maintain masterdata entities so that the POS can correctly consume them. So we need to fix it somehow.

The final approach that will be used to handle this case is still to be decided by platform team. They will review it and then propose changes to handle this case.
(0166459)
caristu (manager)
2024-06-28 10:19

We are not able to reproduce the issue with the provided steps. In this type of cases a request example usually helps.
(0168700)
martinsdan (developer)
2024-09-03 13:36

I reopened the issue, updated the steps to reproduce and added a video.
(0168702)
adrianromero (manager)
2024-09-03 13:43

This issue is registered as RM-16449 [NOZ] Being able to activate/deactivate a price in a pricelist version by API

That is candidate for October Sprint.
(0168708)
martinsdan (developer)
2024-09-03 15:39

I added the json used to reproduce the problem in livebuilds.
(0168919)
alostale (manager)
2024-09-09 10:28

This is happening if org.openbravo.commercialoperations.api module is installed.
(0168923)
hgbot (developer)
2024-09-09 11:15

Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.commercialoperations.api/-/merge_requests/18 [^]
(0169298)
hgbot (developer)
2024-09-18 07:25

Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.commercialoperations.api [^]
Changeset: 40fb25ff9e2a1baf179da0f41d377833c6074f8d
Author: Asier Lostalé <a.lostale@orisha.com>
Date: 09-09-2024 11:12:11
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.commercialoperations.api/-/commit/40fb25ff9e2a1baf179da0f41d377833c6074f8d [^]

fixes BUG-55222: error updating price for inactive products

If a product was inactive and its price was tried to be updated through API, a
unique constraint error was thrown. The problem was caused because that product
was not found so a new product price row was tried to be inserted.

Fixed by obtaining products even if they are inactive.

---
M src/org/openbravo/commercialoperations/api/hook/productPriceException/ProductPriceBaseOBObjectFetcher.java
---
(0169299)
hgbot (developer)
2024-09-18 07:25

Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.commercialoperations.api/-/merge_requests/18 [^]

- Issue History
Date Modified Username Field Change
2024-04-17 14:30 azzeddine_meftoh New Issue
2024-04-17 14:30 azzeddine_meftoh Assigned To => Triage Platform Conn
2024-04-17 14:30 azzeddine_meftoh Triggers an Emergency Pack => No
2024-04-17 14:49 victor_perez Severity minor => major
2024-04-18 10:29 jorgewederago Assigned To Triage Platform Conn => Retail
2024-04-18 10:29 jorgewederago Status new => acknowledged
2024-04-18 10:37 adrianromero Note Added: 0163352
2024-04-18 10:37 adrianromero Status acknowledged => closed
2024-04-18 10:37 adrianromero Resolution open => no change required
2024-06-27 09:39 marvintm Assigned To Retail => Triage Platform Conn
2024-06-27 09:39 marvintm Note Added: 0166405
2024-06-27 09:39 marvintm Status closed => new
2024-06-27 09:39 marvintm Resolution no change required => open
2024-06-28 10:19 caristu Note Added: 0166459
2024-06-28 10:19 caristu Assigned To Triage Platform Conn => azzeddine_meftoh
2024-06-28 10:19 caristu Status new => feedback
2024-08-12 12:08 marvintm Status feedback => closed
2024-08-12 12:08 marvintm Resolution open => unable to reproduce
2024-09-03 13:30 martinsdan Assigned To azzeddine_meftoh => Triage Platform Conn
2024-09-03 13:30 martinsdan Status closed => new
2024-09-03 13:30 martinsdan Resolution unable to reproduce => open
2024-09-03 13:34 martinsdan Steps to Reproduce Updated View Revisions
2024-09-03 13:34 martinsdan Proposed Solution updated
2024-09-03 13:36 martinsdan File Added: issue55222-lb.mkv
2024-09-03 13:36 martinsdan Note Added: 0168700
2024-09-03 13:43 adrianromero Note Added: 0168702
2024-09-03 15:37 martinsdan File Added: request.json
2024-09-03 15:39 martinsdan Note Added: 0168708
2024-09-06 10:48 rafaroda Priority normal => high
2024-09-09 10:28 alostale Note Added: 0168919
2024-09-09 10:29 alostale Relationship added related to 0053912
2024-09-09 10:29 alostale Assigned To Triage Platform Conn => alostale
2024-09-09 11:15 hgbot Note Added: 0168923
2024-09-09 11:18 alostale Status new => scheduled
2024-09-09 14:19 Rick1212 Note Added: 0168955
2024-09-10 10:28 shuehner Note Deleted: 0168955
2024-09-12 11:36 alostale Relationship added related to 0056207
2024-09-18 07:25 hgbot Resolution open => fixed
2024-09-18 07:25 hgbot Status scheduled => closed
2024-09-18 07:25 hgbot Note Added: 0169298
2024-09-18 07:25 hgbot Note Added: 0169299


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker