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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0052647
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Retail Modules] Retail APImajoralways2023-06-01 18:112023-06-22 08:02
Reporteralfonso_alcaldeView Statuspublic 
Assigned Toranjith_qualiantech_com 
PriorityhighResolutionfixedFixed in Version
StatusclosedFix in branchFixed in SCM revision
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS Version23Q3Database versionAnt version
Product VersionSCM revision 
Merge Request Statusapproved
Review Assigned To
OBNetwork customerOBPS
Support ticket
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0052647: API ImportService PriceList ERROR

DescriptionWhen trying to import a PriceList via API, and the Default Price List Schema created in the first execution does not exist (it can be deleted from BO) and remains cached in the server, the following error occurs:

ERROR: insert or update on table "m_pricelist_version" violates foreign key constraint "m_pricelist_version_m_discount"
  Detail: Key (m_discountschema_id)=(18C8CB845836403A95275AB61B4636C6) is not present in table "m_discountschema".

If the schema does not exist, in the first execution it is created and cached from the following method:

org.openbravo.api.mappings.pricelist/PriceListVersionOBObjectInitializer/getPriceListSchema.

Attached is json from "sampledata" to reproduce the error.
Steps To ReproduceDelete the price list schema called "Default Price List Schema", if it exists, from BO.

Execute the following API POST method:

/ws/org.openbravo.api.ImportService/PriceList

No products or exceptions are needed.

Attached json with example "sampledata".
TagsNo tags attached.
Attached Files? file icon PriceList.json [^] (430 bytes) 2023-06-01 18:11

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
(0151130)
hgbot (developer)
2023-06-14 07:51

Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.api/-/merge_requests/155 [^]
(0151472)
hgbot (developer)
2023-06-22 08:02

Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.api [^]
Changeset: 4f68445023e3fa6661e5fb5c0aaf4bc7a5176302
Author: Ranjith S R <ranjith@qualiantech.com>
Date: 22-06-2023 05:32:20
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.api/-/commit/4f68445023e3fa6661e5fb5c0aaf4bc7a5176302 [^]

Fixed ISSUE-52647: PriceListSchema should be always fetched from database
* When importing pricelist, default price list should be fetched from database
  instead of ConcurrentHashMap cache

---
M src/org/openbravo/api/mappings/pricelist/PriceListVersionOBObjectInitializer.java
---
(0151473)
hgbot (developer)
2023-06-22 08:02

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

- Issue History
Date Modified Username Field Change
2023-06-01 18:11 alfonso_alcalde New Issue
2023-06-01 18:11 alfonso_alcalde Assigned To => Triage Platform Conn
2023-06-01 18:11 alfonso_alcalde File Added: PriceList.json
2023-06-01 18:11 alfonso_alcalde OBNetwork customer => OBPS
2023-06-01 18:11 alfonso_alcalde Triggers an Emergency Pack => No
2023-06-01 18:17 marvintm Assigned To Triage Platform Conn => Retail
2023-06-12 14:20 ranjith_qualiantech_com Assigned To Retail => ranjith_qualiantech_com
2023-06-13 08:22 ranjith_qualiantech_com Status new => scheduled
2023-06-14 07:51 hgbot Merge Request Status => open
2023-06-14 07:51 hgbot Note Added: 0151130
2023-06-22 08:02 hgbot Merge Request Status open => approved
2023-06-22 08:02 hgbot Resolution open => fixed
2023-06-22 08:02 hgbot Status scheduled => closed
2023-06-22 08:02 hgbot Note Added: 0151472
2023-06-22 08:02 hgbot Note Added: 0151473


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker