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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0055258
TypeCategorySeverityReproducibilityDate SubmittedLast Update
backport[Retail Modules] Retail APImajoralways2024-04-08 11:142024-04-23 09:10
ReportergorkaionView Statuspublic 
Assigned ToRajesh_18 
PriorityhighResolutionfixedFixed in Version
StatusclosedFix in branchFixed in SCM revision
ProjectionnoneETAnoneTarget VersionRR24Q2
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

0055258: Consume Coupons API returns a 500 error when the coupon is consumed

DescriptionWhen the Coupons API is called with a coupon that it is already consumed the response has 500 status. The expected result is a 2XX status with an error message since the call has not fail technically.
Steps To Reproduce1. Create a coupon in backend for a single use.
2. Check using the API that the coupon code is available using /org.openbravo.api.ExportService/Coupon/byCouponCode
3. Consume the coupon using /ws/org.openbravo.retail.discounts.coupons.api.ConsumeCoupon the response is 2XX
4. Check again the coupon and notice the coupon is already used.
5. Try to consume again the coupon using the ConsumeCoupon api, notice that the response is a 500 error. This is wrong, status should be 2XX with a message indicating that the coupon is already expired/consumed/...
Proposed Solutionchange the response status to 2XX
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
blocks defect 0055120 closedRajesh_18 Consume Coupons API returns a 500 error when the coupon is consumed 

-  Notes
(0163559)
hgbot (developer)
2024-04-23 08:46

Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts.coupons.api/-/merge_requests/16 [^]
(0163569)
hgbot (developer)
2024-04-23 09:10

Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts.coupons.api/-/merge_requests/16 [^]
(0163570)
hgbot (developer)
2024-04-23 09:10

Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts.coupons.api [^]
Changeset: e385c5c9ca1eef579e7396536d15e33de5b393b1
Author: Rajesh Senthilkumar <rajesh@qualiantech.com>
Date: 23-04-2024 12:12:12
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts.coupons.api/-/commit/e385c5c9ca1eef579e7396536d15e33de5b393b1 [^]

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

---
M src/org/openbravo/retail/discounts/coupons/api/service/ConsumeCoupon.java
---

- Issue History
Date Modified Username Field Change
2024-04-19 08:12 marvintm Type defect => backport
2024-04-19 08:12 marvintm Target Version => RR24Q2
2024-04-23 08:46 hgbot Note Added: 0163559
2024-04-23 09:10 hgbot Note Added: 0163569
2024-04-23 09:10 hgbot Resolution open => fixed
2024-04-23 09:10 hgbot Status scheduled => closed
2024-04-23 09:10 hgbot Note Added: 0163570


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker