Openbravo Issue Tracking System - POS2
View Issue Details
0050411POS2POSpublic2022-10-04 18:572022-10-19 13:45
gorka_gil 
gorka_gil 
highmajoralways
closedfixed 
5
 
23Q1 
No
0050411: Free products discounts should be tested by discounts engine before show as candidate
-
Create a free product discount:
- amount : 50
- gift notification : mark
- free products tab: insect repelent
- Include products: only those defined
- Products tab: balaclaba

Go to the pos
- Refresh masterdata
- add avalanche
- click pay

ERROR: it shows the discount as available, but it shouldn't since the discount only apply to balaclavas not avalanches

When clicking on it doesn't do anything, but still it shouldn't be shown as available.
No tags attached.
related to feature request 0049961 closed jorge-garcia Jira 886 - Gift on a minimum amount of ticket 
Issue History
2022-10-04 18:57gorka_gilNew Issue
2022-10-04 18:57gorka_gilAssigned To => gorka_gil
2022-10-04 18:57gorka_gilTriggers an Emergency Pack => No
2022-10-04 18:59gorka_gilSummaryFree products discounts should be tested by discounts enginee before show as candidate => Free products discounts should be tested by discounts engine before show as candidate
2022-10-04 19:04gorka_gilRelationship addedrelated to 0049961
2022-10-04 19:05gorka_gilStatusnew => scheduled
2022-10-14 21:06hgbotNote Added: 0142111
2022-10-14 21:07hgbotNote Added: 0142112
2022-10-19 13:44hgbotNote Added: 0142273
2022-10-19 13:44hgbotResolutionopen => fixed
2022-10-19 13:44hgbotStatusscheduled => closed
2022-10-19 13:44hgbotFixed in Version => RR23Q1
2022-10-19 13:44hgbotNote Added: 0142274
2022-10-19 13:44hgbotNote Added: 0142275
2022-10-19 13:44hgbotNote Added: 0142276
2022-10-19 13:44hgbotNote Added: 0142277
2022-10-19 13:44hgbotNote Added: 0142278
2022-10-19 13:44hgbotNote Added: 0142279
2022-10-19 13:45hgbotNote Added: 0142280
2022-10-19 13:45hgbotFixed in VersionRR23Q1 => 23Q1
2022-10-19 13:45hgbotNote Added: 0142281

Notes
(0142111)
hgbot   
2022-10-14 21:06   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts/-/merge_requests/69 [^]
(0142112)
hgbot   
2022-10-14 21:07   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/merge_requests/1280 [^]
(0142273)
hgbot   
2022-10-19 13:44   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts/-/merge_requests/69 [^]
(0142274)
hgbot   
2022-10-19 13:44   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts [^]
Changeset: 091666dfc2fedf6522f544910574535b774402c8
Author: Gorka Gil <gorka.gil@openbravo.com>
Date: 18-10-2022 05:52:21
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts/-/commit/091666dfc2fedf6522f544910574535b774402c8 [^]

Fixed ISSUE-50411: check available gift product discounts in the discounts engine

---
M web/org.openbravo.retail.discounts/app/model/business-logic/discounts-engine/engine/optional-discount-engine.js
---
(0142275)
hgbot   
2022-10-19 13:44   
Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts [^]
Changeset: 4ef0bc5088d318a672a1b543a255a29201b91248
Author: Gorka Gil <gorka.gil@openbravo.com>
Date: 18-10-2022 05:52:21
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts/-/commit/4ef0bc5088d318a672a1b543a255a29201b91248 [^]

Related to ISSUE-50411: Fix duplicates

---
M web/org.openbravo.retail.discounts/app/model/business-logic/discounts-engine/engine/optional-discount-engine.js
---
(0142276)
hgbot   
2022-10-19 13:44   
Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts [^]
Changeset: 5b179b08455c7a995defe628956ff28ac7ec20c8
Author: Gorka Gil <gorka.gil@openbravo.com>
Date: 18-10-2022 05:52:21
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts/-/commit/5b179b08455c7a995defe628956ff28ac7ec20c8 [^]

Related to ISSUE-50411: Fix condition to load the gift products when evaluating the discount

---
M web/org.openbravo.retail.discounts/app/model/business-logic/discounts-engine/engine/optional-discount-engine.js
---
(0142277)
hgbot   
2022-10-19 13:44   
Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts [^]
Changeset: 16b06e8a58b007c9bc2bccde7af5e7a2a2cb8d2d
Author: Gorka Gil <gorka.gil@openbravo.com>
Date: 18-10-2022 19:45:12
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts/-/commit/16b06e8a58b007c9bc2bccde7af5e7a2a2cb8d2d [^]

Related to ISSUE-50411: adapt jest test

---
M web-test/model/business-logic/discounts-engine/engine/optional-discount-engine.test.js
---
(0142278)
hgbot   
2022-10-19 13:44   
Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts [^]
Changeset: 4a7d8e305aa7a810a1a2a66a7f56c74bd108fa91
Author: Gorka Gil <gorka.gil@openbravo.com>
Date: 19-10-2022 11:18:00
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts/-/commit/4a7d8e305aa7a810a1a2a66a7f56c74bd108fa91 [^]

Related to ISSUE-50411: Add jest tests

---
M web-test/model/business-logic/discounts-engine/engine/optional-discount-engine.test.js
---
(0142279)
hgbot   
2022-10-19 13:44   
Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts [^]
Changeset: f640813f44eda4109a5d5088e1e9d6b905d3f67c
Author: Gorka Gil <gorka.gil@openbravo.com>
Date: 19-10-2022 11:20:26
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts/-/commit/f640813f44eda4109a5d5088e1e9d6b905d3f67c [^]

Related to ISSUE-50411: add deepfreeze to the jest tests

---
M web-test/model/business-logic/discounts-engine/engine/optional-discount-engine.test.js
---
(0142280)
hgbot   
2022-10-19 13:45   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/merge_requests/1280 [^]
(0142281)
hgbot   
2022-10-19 13:45   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2 [^]
Changeset: 9ef31185ccad2836b5d1132d318c1196e9558840
Author: Gorka Gil <gorka.gil@openbravo.com>
Date: 19-10-2022 11:44:50
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/commit/9ef31185ccad2836b5d1132d318c1196e9558840 [^]

Fixed ISSUE-50411: check available gift product discounts in the discounts engine

---
M web-jspack/org.openbravo.pos2/src/components/Discounts/FeaturedDiscount/FeaturedDiscountPanelGrid/FeaturedDiscountPanelGrid.jsx
M web-jspack/org.openbravo.pos2/src/components/Discounts/FeaturedDiscount/FeaturedDiscountsPaymentFlowHook.js
M web-jspack/org.openbravo.pos2/src/components/Discounts/ManualDiscount/DiscountPanelGrid/DiscountPanelGrid.jsx
M web-jspack/org.openbravo.pos2/src/components/Discounts/OrderDiscount/OrderDiscountOnExitDialog/OrderDiscountOnExitDialog.js
M web-jspack/org.openbravo.pos2/src/components/Discounts/OrderDiscount/OrderDiscountPanelGrid/OrderDiscountPanelGrid.jsx
M web-jspack/org.openbravo.pos2/src/components/Discounts/shared/OptionalDiscountsUtils.js
---