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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0050804
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Retail Modules] Retail API Gift Cardsmajorhave not tried2022-11-09 12:052023-02-22 09:28
Reportercollazoandy4View Statuspublic 
Assigned To 
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

0050804: Gift card consume amount api search by search key instead of gift card id

DescriptionWhen two terminals have the same Return Sequence Prefix duplicated credit notes are created and a wrong Gift Card amount could be consumed in the ConsumeGiftCardAmount.java because the api search the gift cards by searchKey instead gift card id
Steps To ReproduceCreate a new receipt for Arturo Montoto and pay it
Return the previous receipt using Credit Note as payment method
Create another receipt for Arturo Montoto and pay it using the previous credit note
Check in backoffice the previous credit note is closed
Create a new receipt for Carl Studson and pay it
Return the previous receipt using Credit Note as payment method
Update the search key thought database to be the same as the one created for Arturo Montoto
Create a new receipt for Carl Studson and pay it using Credit Note as payment method
Check that the Credit Note created for Arturo Montoto could be used to be consumed or can be displayed in the Giftcard Details popup as the search is by search key instead the search key id
Proposed SolutionSearch the giftcard by id instead of search key in ConsumeGiftCardAmount.java and FindGiftCard.java endpoints
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
(0143299)
hgbot (developer)
2022-11-09 12:27

Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.giftcards/-/merge_requests/166 [^]
(0144187)
marvintm (manager)
2022-11-28 08:07

The search key for the gift card instances is supposed to be unique, and that is why it is used across the application to identify them, in all flows (not just credit notes, but also gift cards and vouchers, and certificates).

If the return sequence prefix is duplicated, not just credit notes, but also duplicated returns will be generated, which would be even worse, right?

IMO we should not change the API, but identify why the search key for credit notes is duplicated, and prevent that.
(0145141)
hgbot (developer)
2023-01-04 01:20

Merge request closed: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.giftcards/-/merge_requests/166 [^]
(0145179)
hgbot (developer)
2023-01-04 18:38

Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.giftcards/-/merge_requests/181 [^]
(0146814)
hgbot (developer)
2023-02-21 15:29

Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.giftcards [^]
Changeset: ec230b52f44be12b73d0cc8d55abfae667c43e80
Author: Andy Armaignac Collazo <andy.collazo@openbravo.com>
Date: 21-02-2023 14:29:42
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.giftcards/-/commit/ec230b52f44be12b73d0cc8d55abfae667c43e80 [^]

Fixes ISSUE-50804: Added Unique constraints for value column

---
A build/classes/org/openbravo/retail/giftcards/buildvalidation/DuplicatedGiftcardSearchKey.class
A build/classes/org/openbravo/retail/giftcards/buildvalidation/DuplicatedGiftcardSearchKeyData.class
A src-util/buildvalidation/src/org/openbravo/retail/giftcards/buildvalidation/DuplicatedGiftcardSearchKey.java
A src-util/buildvalidation/src/org/openbravo/retail/giftcards/buildvalidation/DuplicatedGiftcardSearchKey_data.xsql
M src-db/database/model/tables/GCNV_GIFTCARD_INST.xml
M src/org/openbravo/retail/giftcards/GiftCardModel.java
---
(0146815)
hgbot (developer)
2023-02-21 15:29

Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.giftcards/-/merge_requests/181 [^]
(0146859)
hgbot (developer)
2023-02-22 09:28

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.giftcards [^]
Changeset: e540226dc3c27a0dd731d8b69e96696854c20184
Author: Aaron Calero <aaron.calero@openbravo.com>
Date: 22-02-2023 09:25:37
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.giftcards/-/commit/e540226dc3c27a0dd731d8b69e96696854c20184 [^]

Related to ISSUE-50804: Fixed dbconsistency

---
M src-db/database/model/tables/GCNV_GIFTCARD_INST.xml
---

- Issue History
Date Modified Username Field Change
2022-11-09 12:05 collazoandy4 New Issue
2022-11-09 12:05 collazoandy4 Assigned To => Retail
2022-11-09 12:05 collazoandy4 Triggers an Emergency Pack => No
2022-11-09 12:27 hgbot Note Added: 0143299
2022-11-09 14:01 ranjith_qualiantech_com Assigned To Retail => ranjith_qualiantech_com
2022-11-09 14:01 ranjith_qualiantech_com Status new => scheduled
2022-11-28 08:07 marvintm Note Added: 0144187
2022-11-28 08:07 marvintm Assigned To ranjith_qualiantech_com => kchoperena
2022-11-28 08:07 marvintm Status scheduled => feedback
2023-01-04 01:20 hgbot Note Added: 0145141
2023-01-04 18:38 hgbot Note Added: 0145179
2023-01-05 12:00 kchoperena Assigned To kchoperena => marvintm
2023-01-10 08:33 marvintm Status feedback => scheduled
2023-01-10 08:33 marvintm Assigned To marvintm => collazoandy4
2023-02-13 07:51 marvintm Assigned To collazoandy4 =>
2023-02-21 15:29 hgbot Resolution open => fixed
2023-02-21 15:29 hgbot Status scheduled => closed
2023-02-21 15:29 hgbot Note Added: 0146814
2023-02-21 15:29 hgbot Note Added: 0146815
2023-02-22 09:28 hgbot Note Added: 0146859


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker