Openbravo Issue Tracking System - Retail Modules
View Issue Details
0055121Retail ModulesRetail API Gift Cardspublic2024-04-08 11:192024-04-19 08:13
gorkaion 
Rajesh_18 
highmajoralways
closedfixed 
5
 
RR24Q3 
marvintm
No
0055121: Consume GiftCards API returns a 500 error when the coupon is consumed
When the Consume Giftcards API is called with a giftcard that it is already closed the response has 500 status. The expected result is a 2XX status with an error message since the call has not fail technically.
1. Create new GiftCard instance.
2. Check using the API that the giftcard is available using /org.openbravo.api.ExportService/GiftCard/bySearchKey
3. Consume completelly (with an amount higher than the available) the giftcard using /ws/org.openbravo.retail.api.giftcards.ImportService/ConsumeGiftCard the response is 2XX
4. Check again the giftcard and notice it is closed.
5. Try to consume again the giftcards using the ConsumeGiftcard api, notice that the response is a 500 error. This is wrong, status should be 2XX with a message indicating that the giftcard is already expired/consumed/...
change the response status to 2XX
No tags attached.
related to defect 0055120 closed Rajesh_18 Consume Coupons API returns a 500 error when the coupon is consumed 
depends on backport 0055260RR24Q2 closed Rajesh_18 Consume GiftCards API returns a 500 error when the coupon is consumed 
Issue History
2024-04-08 11:19gorkaionNew Issue
2024-04-08 11:19gorkaionAssigned To => Retail
2024-04-08 11:19gorkaionTriggers an Emergency Pack => No
2024-04-08 11:19gorkaionIssue generated from0055120
2024-04-08 11:19gorkaionRelationship addedrelated to 0055120
2024-04-08 11:23marvintmStatusnew => acknowledged
2024-04-15 06:39Rajesh_18Assigned ToRetail => Rajesh_18
2024-04-15 06:39Rajesh_18Statusacknowledged => scheduled
2024-04-16 13:06hgbotNote Added: 0163281
2024-04-18 13:25hgbotResolutionopen => fixed
2024-04-18 13:25hgbotStatusscheduled => closed
2024-04-18 13:25hgbotNote Added: 0163376
2024-04-18 13:25hgbotNote Added: 0163377
2024-04-19 08:13marvintmStatusclosed => new
2024-04-19 08:13marvintmResolutionfixed => open
2024-04-19 08:13marvintmStatusnew => scheduled
2024-04-19 08:13marvintmStatusscheduled => resolved
2024-04-19 08:13marvintmFixed in Version => RR24Q3
2024-04-19 08:13marvintmResolutionopen => fixed
2024-04-19 08:13marvintmReview Assigned To => marvintm
2024-04-19 08:13marvintmStatusresolved => closed

Notes
(0163281)
hgbot   
2024-04-16 13:06   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.api.giftcards/-/merge_requests/34 [^]
(0163376)
hgbot   
2024-04-18 13:25   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.api.giftcards [^]
Changeset: 916898b0b4dcbd9654b6f3a875be4e2d35b80996
Author: Rajesh Senthilkumar <rajesh@qualiantech.com>
Date: 16-04-2024 16:33:16
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.api.giftcards/-/commit/916898b0b4dcbd9654b6f3a875be4e2d35b80996 [^]

Fixed ISSUE-55121: Catched OBException and returned the response status as 200

---
M src/org/openbravo/retail/api/giftcards/service/ConsumeGiftCardApiImportWebService.java
---
(0163377)
hgbot   
2024-04-18 13:25   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.api.giftcards/-/merge_requests/34 [^]