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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0054840
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Retail Modules] Retail APImajoralways2024-03-05 11:332024-03-19 16:01
ReporterAgatheBertinView Statuspublic 
Assigned ToRajesh_18 
PrioritynormalResolutionfixedFixed in Version
StatusclosedFix in branchFixed in SCM revision
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned To
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0054840: API OTF Coupon Rule : Missing Identifier for ExternalEntities

DescriptionIdentifier are missing for the following entities (despite an unicity constraint in the datebase for some of them)

OBCPOTF_CouponrulesOrg => should be organization

OBCPOTF_CouponrulesPrint => should be organization + language

OBCPOTF_CouponrulesBPCat => should be businessPartnerCategory

OBCPOTF_CouponrulesChar => should be Characteristic + value
Steps To ReproduceLaunch an API call to create an OTF with all the subtabs filled
==> relaunch the exact same call ==> ERROR in the EDLs
Proposed SolutionOBCPOTF_CouponrulesOrg => should be organization

OBCPOTF_CouponrulesPrint => should be organization + language

OBCPOTF_CouponrulesBPCat => should be businessPartnerCategory

OBCPOTF_CouponrulesChar => should be Characteristic + value
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
(0162009)
AgatheBertin (developer)
2024-03-12 10:53

To test it, when we launch, for example a call to integrate an OTF Generation Rule through API with the table organizations filled , and then relaunch a second time the exact same call, you have this error

ERROR: duplicate key value violates unique constraint "obcpotf_couprl_org_unique"
  Detail: Key (ad_client_id, ad_org_id, obcpotf_couponrules_id)=(XXXXXXXXXXXXXXXXXXXXXXXX, YYYYYYYYYYYYYYY, ZZZZZZZZZZZZZZZZ) already exists.


Expected behavior : update the value in the organization tab or do not update if there is no change, but no errors are expected.



JSON EXAMPLE :
[{"client":"Openbravo","organization":"*","searchKey":"testIntegrationviaAPI","active":true,"applicant":"testIntegrationviaAPI","discount":"test otf","description":"test otf","requestDate":"2023-12-05","startingDate":"2023-12-05","endingDate":null,"isOneCouponPerTransaction":true,"isNominalCoupon":true,"amountRule":"Percentage","xUnits":null,"yUnits":null,"applicationRule":null,"discountPercentage":"10","minQuantity":null,"includedOrganizations":"Y","includedBPCategories":"Y","includedProducts":"Y","includedProductCategories":"Y","includedCharacteristics":"Y","excludedCharacteristics":"Y","allDays":true,"startingTime":null,"endingTime":null,"isMonday":true,"isTuesday":true,"isWednesday":true,"isThursday":true,"isFriday":true,"isSaturday":true,"isSunday":true,"validFromUnit":"days","validToUnit":"days","validFromValue":"0","validToValue":"30","organizations":[{"organization":"0000001203"}],"products":[{"product":"366833","minQuantity":2}],"productCategories":[{"productCategory":"062"}],"characteristics":[{"characteristic":"Autonomie","value":"8H","isIncluded":false}],"printTextInformation":[{"language":"French (France)","title":"testABE","text":"testABEtext","description":"testABEdesc"}]}]
(0162118)
hgbot (developer)
2024-03-14 05:57

Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts.coupons.otf.api/-/merge_requests/12 [^]
(0162368)
hgbot (developer)
2024-03-19 16:01

Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts.coupons.otf.api [^]
Changeset: cab1e9a1801938e8d848fdb64484aa18e74954a1
Author: Rajesh Senthilkumar <rajesh@qualiantech.com>
Date: 13-03-2024 16:46:48
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts.coupons.otf.api/-/commit/cab1e9a1801938e8d848fdb64484aa18e74954a1 [^]

Fixed ISSUE-54840: Set Identifiers for organization,businessPartnerCategory,Characteristic and Print

---
M src-db/database/sourcedata/OBEI_PROP_MAP_INSTANCE.xml
---
(0162369)
hgbot (developer)
2024-03-19 16:01

Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts.coupons.otf.api/-/merge_requests/12 [^]

- Issue History
Date Modified Username Field Change
2024-03-05 11:33 AgatheBertin New Issue
2024-03-05 11:33 AgatheBertin Assigned To => Triage Platform Conn
2024-03-05 11:33 AgatheBertin Triggers an Emergency Pack => No
2024-03-07 10:29 adrianromero Assigned To Triage Platform Conn => Retail
2024-03-12 10:53 AgatheBertin Note Added: 0162009
2024-03-12 11:06 jorgewederago Status new => acknowledged
2024-03-13 10:09 Rajesh_18 Assigned To Retail => Rajesh_18
2024-03-13 10:09 Rajesh_18 Status acknowledged => scheduled
2024-03-14 05:57 hgbot Note Added: 0162118
2024-03-19 16:01 hgbot Resolution open => fixed
2024-03-19 16:01 hgbot Status scheduled => closed
2024-03-19 16:01 hgbot Note Added: 0162368
2024-03-19 16:01 hgbot Note Added: 0162369


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker