Openbravo Issue Tracking System - Retail Modules
View Issue Details
0050706Retail ModulesWeb POSpublic2022-11-02 14:152023-02-17 11:24
noemieroussel 
prakashmurugesan88 
urgentminoralways
closedfixed 
5
 
RR23Q2 
No
0050706: [PROMO] - Product category and Characteristics KO in "Buy X and get Y as a gift" promotion
In "Buy X and get Y as a gift" promotion type, the filter "Product category" and "Characteristics" are not taken into account.

ggi:
Filter the discounts by product category with buyxgifty has a design defect. Since the gift product needs to be added to product tab, but in the combo is selected all products except defined, since we are filtering by product category.

The solution should be defined by product management team (maybe move the gift products to a new tab like in free products per total amount)
1. Go to the Backoffice.

2. Create a promotion "Buy X and get Y as a gift" with those parameters:

Filters:
-Product category=Only those defined

Product category subtab (X):
-in the product category subtab, add "Mountains"

Characteristics subtab :
-in the characteristics subtab, add "Color"="Blue"

Product subtab (Y):
-in the product subtab, add "Bottle 1L", tick the checkbox "Gift product", add quantity =1

Definition:
-"Buy Any X Gift Any Y"
-X unit=2
-Min Y Units=0 ; Max Y Units=1

POS Configuration:
-Gift reminder notification checked
-Application method: Automatic


In the WebPOS, add 2 products from the Mountain category filtered by color=Blue, and see that the promotion do not appears.
FASH
has duplicate defect 0050771 closed radhakrishnan Retail Modules Promo type "Buy X and get Y as gift" isn't trigger on characteristics value 
related to defect 0051684 closed Retail Retail Modules Accumulating several filters for Promo type Buy X Get Y 
related to defect 0051897 closed Retail Retail Modules [Promo] - Buy X Get Y - Promotion KO when product categories and / or product characteristics selected in the filters 
causes defect 0052762 closed ranjith_qualiantech_com Openbravo ERP Problem with 'Product' tab in 'Discounts and promotions' window in a customer without retail 
Issue History
2022-11-02 14:15noemierousselNew Issue
2022-11-02 14:15noemierousselAssigned To => Retail
2022-11-02 14:15noemierousselTriggers an Emergency Pack => No
2022-11-02 14:15noemierousselTag Attached: FASH
2022-11-02 14:25gorka_gilCategoryDiscounts and Promotions => Web POS
2022-11-02 14:25gorka_gilTypedefect => design defect
2022-11-02 14:25gorka_gilProposed Solution updated
2022-11-23 10:19noemierousselSummary[PROMO] - Product category KO in "Buy X and get Y as a gift" promotion => [PROMO] - Product category and Characteristics KO in "Buy X and get Y as a gift" promotion
2022-11-23 10:19noemierousselDescription Updatedbug_revision_view_page.php?rev_id=25160#r25160
2022-11-23 10:19noemierousselSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=25162#r25162
2022-11-23 11:02rafarodaPrioritynormal => urgent
2022-11-30 10:13rafarodaRelationship addedrelated to 0050771
2022-11-30 13:55gorka_gilDescription Updatedbug_revision_view_page.php?rev_id=25192#r25192
2022-11-30 13:55gorka_gilProposed Solution updated
2022-11-30 13:57gorka_gilRelationship replacedhas duplicate 0050771
2023-01-20 07:14prakashmurugesan88Assigned ToRetail => prakashmurugesan88
2023-01-20 07:14prakashmurugesan88Statusnew => scheduled
2023-02-10 06:49hgbotNote Added: 0146349
2023-02-10 06:52hgbotNote Added: 0146350
2023-02-10 06:57hgbotNote Added: 0146351
2023-02-16 13:47hgbotNote Added: 0146640
2023-02-16 13:47hgbotNote Added: 0146641
2023-02-16 13:47hgbotNote Added: 0146642
2023-02-16 13:47hgbotNote Added: 0146643
2023-02-16 13:47hgbotResolutionopen => fixed
2023-02-16 13:47hgbotStatusscheduled => closed
2023-02-16 13:47hgbotFixed in Version => RR23Q2
2023-02-16 13:47hgbotNote Added: 0146644
2023-02-16 13:47hgbotNote Added: 0146645
2023-02-16 13:47hgbotNote Added: 0146646
2023-02-16 13:47hgbotNote Added: 0146647
2023-02-16 13:48hgbotNote Added: 0146648
2023-02-16 13:48hgbotNote Added: 0146649
2023-02-16 13:48hgbotNote Added: 0146650
2023-02-16 13:48hgbotNote Added: 0146651
2023-02-16 14:04hgbotNote Added: 0146652
2023-02-16 17:34hgbotNote Added: 0146663
2023-02-17 11:24hgbotNote Added: 0146690
2023-02-23 17:17rafarodaRelationship addedrelated to 0051684
2023-03-20 11:12rafarodaRelationship addedrelated to 0051897
2023-07-05 09:09rafarodaRelationship addedcauses 0052762

Notes
(0146349)
hgbot   
2023-02-10 06:49   
Merge Request created: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/820 [^]
(0146350)
hgbot   
2023-02-10 06:52   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/merge_requests/1061 [^]
(0146351)
hgbot   
2023-02-10 06:57   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts/-/merge_requests/86 [^]
(0146640)
hgbot   
2023-02-16 13:47   
Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts [^]
Changeset: 1e82c4386aed90243dbb8cd2b6606823df9e838f
Author: Prakash M <prakash@qualiantech.com>
Date: 31-01-2023 11:03:40
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts/-/commit/1e82c4386aed90243dbb8cd2b6606823df9e838f [^]

Related to ISSUE-50706: Created Separate Gift Product Tab
* Included GiftQty field in new tab
* Removed GiftProduct and GiftQty fields in Product Tab
* Added new qty field in Product Category and Included Characteristics

---
A src-db/database/model/modifiedTables/M_OFFER_CHARACTERISTIC.xml
A src-db/database/model/modifiedTables/M_OFFER_PROD_CAT.xml
A src/org/openbravo/retail/discounts/event/MOfferCharacteristicsEventHandler.java
A src/org/openbravo/retail/discounts/event/MOfferProductCtgryEventHandler.java
M src-db/database/sourcedata/AD_COLUMN.xml
M src-db/database/sourcedata/AD_ELEMENT.xml
M src-db/database/sourcedata/AD_FIELD.xml
M src/org/openbravo/retail/discounts/event/MOfferProductEventHandler.java
---
(0146641)
hgbot   
2023-02-16 13:47   
Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts [^]
Changeset: d90688e9c8266053a6d91b8498b86e10fcc8d79e
Author: Prakash M <prakash@qualiantech.com>
Date: 06-02-2023 16:56:26
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts/-/commit/d90688e9c8266053a6d91b8498b86e10fcc8d79e [^]

Related to ISSUE-50706: Included Product Category filter validation in Buy X Gift Y discount

---
M web/org.openbravo.retail.discounts/app/model/business-logic/discounts-engine/engine/discount-rules.js
M web/org.openbravo.retail.discounts/app/model/business-logic/discounts-engine/engine/rules/buy-x-gift-y-discount.js
---
(0146642)
hgbot   
2023-02-16 13:47   
Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts [^]
Changeset: 7e64db5ec6c9ef6db0e7bc55f6a459d9d3b2d07d
Author: Prakash M <prakash@qualiantech.com>
Date: 07-02-2023 11:49:32
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts/-/commit/7e64db5ec6c9ef6db0e7bc55f6a459d9d3b2d07d [^]

Related to ISSUE-50706: Included Product Characteristics filter validation in Buy X Gift Y discount

---
M web/org.openbravo.retail.discounts/app/model/business-logic/discounts-engine/engine/rules/buy-x-gift-y-discount.js
---
(0146643)
hgbot   
2023-02-16 13:47   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts/-/merge_requests/86 [^]
(0146646)
hgbot   
2023-02-16 13:47   
Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts [^]
Changeset: 66951702c0dee72eb2eee050eb5aa2dadf918afe
Author: Prakash M <prakash@qualiantech.com>
Date: 16-02-2023 14:59:48
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts/-/commit/66951702c0dee72eb2eee050eb5aa2dadf918afe [^]

Related to ISSUE-50706: Validated Either Product or Product Category or Product Characteristics can be
Only those defined or Any of the ones defined

---
M src-db/database/sourcedata/AD_MESSAGE.xml
M src/org/openbravo/retail/discounts/event/MOfferCharacteristicsEventHandler.java
M src/org/openbravo/retail/discounts/event/MOfferEventHandler.java
M src/org/openbravo/retail/discounts/event/MOfferProductCtgryEventHandler.java
---
(0146647)
hgbot   
2023-02-16 13:47   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts [^]
Changeset: 624e6ffeb9f827ef5f3ce58b3fdc7b8bb5ada8e3
Author: Antonio Moreno <antonio.moreno@openbravo.com>
Date: 16-02-2023 13:47:36
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts/-/commit/624e6ffeb9f827ef5f3ce58b3fdc7b8bb5ada8e3 [^]

Fixed ISSUE-50706: Merged branch fix/50706

---
A src-db/database/model/modifiedTables/M_OFFER_CHARACTERISTIC.xml
A src-db/database/model/modifiedTables/M_OFFER_PROD_CAT.xml
A src/org/openbravo/retail/discounts/event/MOfferCharacteristicsEventHandler.java
A src/org/openbravo/retail/discounts/event/MOfferProductCtgryEventHandler.java
M src-db/database/sourcedata/AD_COLUMN.xml
M src-db/database/sourcedata/AD_ELEMENT.xml
M src-db/database/sourcedata/AD_FIELD.xml
M src-db/database/sourcedata/AD_MESSAGE.xml
M src-test/org/openbravo/retail/discounts/test/base/model/OfferCharacteristic.java
M src-test/org/openbravo/retail/discounts/test/base/model/ProductCategory.java
M src-test/org/openbravo/retail/discounts/test/unittests/DiscountBuyAllXGiftAllYTest.java
M src-test/org/openbravo/retail/discounts/test/unittests/DiscountBuyAllXGiftAnyYTest.java
M src-test/org/openbravo/retail/discounts/test/unittests/DiscountBuyAnyXGiftAllYTest.java
M src-test/org/openbravo/retail/discounts/test/unittests/DiscountBuyAnyXGiftAnyYTest.java
M src/org/openbravo/retail/discounts/event/MOfferEventHandler.java
M src/org/openbravo/retail/discounts/event/MOfferProductEventHandler.java
M web/org.openbravo.retail.discounts/app/model/business-logic/discounts-engine/engine/discount-rules.js
M web/org.openbravo.retail.discounts/app/model/business-logic/discounts-engine/engine/rules/buy-x-gift-y-discount.js
---
(0146645)
hgbot   
2023-02-16 13:47   
Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts [^]
Changeset: 1167cc9f79d9ca25967ce3b09764dc74bafe5b35
Author: Prakash M <prakash@qualiantech.com>
Date: 09-02-2023 20:05:24
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts/-/commit/1167cc9f79d9ca25967ce3b09764dc74bafe5b35 [^]

Related to ISSUE-50706: Included Product Category and Product Characteristics to Gift Reminder Notification

---
M web/org.openbravo.retail.discounts/app/model/business-logic/discounts-engine/engine/rules/buy-x-gift-y-discount.js
---
(0146644)
hgbot   
2023-02-16 13:47   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts [^]
Changeset: d03f40ee588063e5c59a47df19aff36c95a6073c
Author: Prakash M <prakash@qualiantech.com>
Date: 08-02-2023 18:31:41
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts/-/commit/d03f40ee588063e5c59a47df19aff36c95a6073c [^]

Fixes ISSUE-50706: Added new test for Product Category and Product Characteristics filter in Buy X Gift Y discount

---
M src-test/org/openbravo/retail/discounts/test/base/model/OfferCharacteristic.java
M src-test/org/openbravo/retail/discounts/test/base/model/ProductCategory.java
M src-test/org/openbravo/retail/discounts/test/unittests/DiscountBuyAllXGiftAllYTest.java
M src-test/org/openbravo/retail/discounts/test/unittests/DiscountBuyAllXGiftAnyYTest.java
M src-test/org/openbravo/retail/discounts/test/unittests/DiscountBuyAnyXGiftAllYTest.java
M src-test/org/openbravo/retail/discounts/test/unittests/DiscountBuyAnyXGiftAnyYTest.java
---
(0146648)
hgbot   
2023-02-16 13:48   
Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal [^]
Changeset: 48d2bf1391841b8e0fc3c60cf3b4b08a3ca0c93e
Author: Prakash M <prakash@qualiantech.com>
Date: 15-02-2023 15:28:39
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/commit/48d2bf1391841b8e0fc3c60cf3b4b08a3ca0c93e [^]

Related to ISSUE-50706: Added Product Category and Product Characteristics Discount Qty properties

---
M src/org/openbravo/retail/posterminal/master/DiscountFilterCharacteristicProperties.java
M src/org/openbravo/retail/posterminal/master/DiscountFilterProductCategoryProperties.java
---
(0146649)
hgbot   
2023-02-16 13:48   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/merge_requests/1061 [^]
(0146650)
hgbot   
2023-02-16 13:48   
Repository: https://gitlab.com/openbravo/product/openbravo [^]
Changeset: ae50b716be895db7f75fad22f3a2cf9bc5981093
Author: Prakash M <prakash@qualiantech.com>
Date: 15-02-2023 15:28:46
URL: https://gitlab.com/openbravo/product/openbravo/-/commit/ae50b716be895db7f75fad22f3a2cf9bc5981093 [^]

Related to ISSUE-50706: Created Separate Gift Product Tab
* Filtered existing product tab records with isGiftProduct false

---
M src-db/database/sourcedata/AD_FIELD.xml
M src-db/database/sourcedata/AD_TAB.xml
---
(0146651)
hgbot   
2023-02-16 13:48   
Merge request merged: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/820 [^]
(0146652)
hgbot   
2023-02-16 14:04   
Repository: https://gitlab.com/openbravo/product/openbravo [^]
Changeset: d37b90a619b292ad3e2427affb49084f2618e346
Author: Antonio Moreno <antonio.moreno@openbravo.com>
Date: 16-02-2023 14:04:11
URL: https://gitlab.com/openbravo/product/openbravo/-/commit/d37b90a619b292ad3e2427affb49084f2618e346 [^]

Related to ISSUE-50706: Solved dbconsistency problem

---
M src-db/database/sourcedata/AD_FIELD.xml
---
(0146663)
hgbot   
2023-02-16 17:34   
Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts [^]
Changeset: 246eeebeba032b6558e168d053ddcf55e4758bb8
Author: Prakash M <prakash@qualiantech.com>
Date: 16-02-2023 21:57:24
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts/-/commit/246eeebeba032b6558e168d053ddcf55e4758bb8 [^]

Related to ISSUE-50706: Fixed null pointer exception in junit test

---
M src/org/openbravo/retail/discounts/event/MOfferProductEventHandler.java
---
(0146690)
hgbot   
2023-02-17 11:24   
Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts [^]
Changeset: 1bc363426e3cdfd1559f058af4b0b63eb5e79197
Author: Prakash M <prakash@qualiantech.com>
Date: 17-02-2023 15:54:24
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts/-/commit/1bc363426e3cdfd1559f058af4b0b63eb5e79197 [^]

Related to ISSUE-50706: Fixed junit test failure with web service
* Skipped Characteristics Filter test as it is not implemented

---
M src-test/org/openbravo/retail/discounts/test/base/model/DiscountRule.java
M src-test/org/openbravo/retail/discounts/test/base/model/definition/BuyXGiftY.java
M src-test/org/openbravo/retail/discounts/test/base/model/definition/DiscountDefinition.java
M src-test/org/openbravo/retail/discounts/test/unittests/DiscountBuyAllXGiftAllYTest.java
M src-test/org/openbravo/retail/discounts/test/unittests/DiscountBuyAllXGiftAnyYTest.java
M src-test/org/openbravo/retail/discounts/test/unittests/DiscountBuyAnyXGiftAllYTest.java
M src-test/org/openbravo/retail/discounts/test/unittests/DiscountBuyAnyXGiftAnyYTest.java
---