Openbravo Issue Tracking System - Retail Modules
View Issue Details
0050635Retail ModulesWeb POSpublic2022-10-25 17:042023-01-03 08:07
gorka_gil 
ranjith_qualiantech_com 
urgentmajoralways
closedfixed 
5
 
RR23Q1 
No
0050635: Fix junit tests of discounts buy x gift y
Many tests of buy x gift y discount are failing in ci.

Needed to fix them and also check why they are not executing in try-retail

Note the errors with tomcat started or stopped could be different.
Errors:
https://builds.openbravo.com/job/mod-simple/60514/#showFailuresLink [^]


No tags attached.
related to defect 0050558 closed caristu org.openbravo.discounts.propertycondition tests are not executed in CI 
Issue History
2022-10-25 17:04gorka_gilNew Issue
2022-10-25 17:04gorka_gilAssigned To => Retail
2022-10-25 17:04gorka_gilTriggers an Emergency Pack => No
2022-10-25 17:05hgbotNote Added: 0142568
2022-11-03 13:07caristuRelationship addedrelated to 0050558
2022-11-10 07:12ranjith_qualiantech_comAssigned ToRetail => ranjith_qualiantech_com
2022-11-10 12:07ranjith_qualiantech_comStatusnew => scheduled
2022-11-14 05:29hgbotNote Added: 0143493
2022-11-14 05:29hgbotNote Added: 0143494
2022-11-14 05:29hgbotNote Added: 0143495
2022-11-21 07:46hgbotResolutionopen => fixed
2022-11-21 07:46hgbotStatusscheduled => closed
2022-11-21 07:46hgbotNote Added: 0143849
2022-11-21 07:46hgbotFixed in Version => RR23Q1
2022-11-21 07:46hgbotNote Added: 0143850
2022-11-21 07:46hgbotNote Added: 0143851
2022-11-21 07:46hgbotNote Added: 0143852
2022-11-21 07:46hgbotNote Added: 0143853
2022-11-21 07:46hgbotNote Added: 0143854
2022-11-21 13:44hgbotNote Added: 0143912
2022-12-06 07:47hgbotNote Added: 0144447
2023-01-03 07:54hgbotNote Added: 0145129
2023-01-03 08:07hgbotNote Added: 0145130
2023-01-03 08:07hgbotNote Added: 0145131

Notes
(0142568)
hgbot   
2022-10-25 17:05   
Repository: https://gitlab.com/openbravo/ci/modules/org.openbravo.retail.discounts.tests [^]
Changeset: e66b0287f11039a2e967ac9b3615c98d7dbe7896
Author: Gorka Gil <gorka.gil@openbravo.com>
Date: 25-10-2022 16:56:44
URL: https://gitlab.com/openbravo/ci/modules/org.openbravo.retail.discounts.tests/-/commit/e66b0287f11039a2e967ac9b3615c98d7dbe7896 [^]

Related to ISSUE-50635: Disable discounts tests till they are fixed

---
M src-test/org/openbravo/retail/discounts/tests/DiscountsMainTestSuite.java
---
(0143493)
hgbot   
2022-11-14 05:29   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts/-/merge_requests/72 [^]
(0143494)
hgbot   
2022-11-14 05:29   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.discounts.propertycondition/-/merge_requests/19 [^]
(0143495)
hgbot   
2022-11-14 05:29   
Merge Request created: https://gitlab.com/openbravo/ci/modules/org.openbravo.retail.discounts.tests/-/merge_requests/5 [^]
(0143849)
hgbot   
2022-11-21 07:46   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts/-/merge_requests/72 [^]
(0143850)
hgbot   
2022-11-21 07:46   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts [^]
Changeset: d45075c38d5cd529a27b6ad9ae464cef652f14cb
Author: Ranjith S R <ranjith@qualiantech.com>
Date: 13-11-2022 14:11:07
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.discounts/-/commit/d45075c38d5cd529a27b6ad9ae464cef652f14cb [^]

Fixed ISSUE-50635: Fixed BuyXGifyY tests
* GiftQty should be considered when calculating BuyXGifyY tests
* Added "STANDARD" to the discount Sub type in reference list
* Discount name should be maximum of 60charaters
*
* DiscountDataHooks should return the respective DiscountType Datahook
  and Any Type DataHook
* Added new param "DiscountRule" to DiscountRuleBOBHook's createExtraSettings method
* ScaledByTotal flag should be updated for ByTotalAmountScaled and
  ByTotalPercentageScaled tests

---
M src-db/database/sourcedata/AD_REF_LIST.xml
M src-test/org/openbravo/retail/discounts/test/base/model/DiscountRule.java
M src-test/org/openbravo/retail/discounts/test/base/model/DiscountRuleBOBHook.java
M src-test/org/openbravo/retail/discounts/test/base/model/definition/ByTotalAmountScaled.java
M src-test/org/openbravo/retail/discounts/test/base/model/definition/ByTotalPercentageScaled.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/org/openbravo/retail/discounts/DiscountDataHookSelector.java
M web/org.openbravo.retail.discounts/app/model/business-logic/discounts-engine/engine/rules/buy-x-gift-y-discount.js
---
(0143851)
hgbot   
2022-11-21 07:46   
Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.discounts.propertycondition [^]
Changeset: 835c67069789028c0c42ef0fedfbe30893632fc7
Author: Ranjith S R <ranjith@qualiantech.com>
Date: 14-11-2022 09:57:10
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.discounts.propertycondition/-/commit/835c67069789028c0c42ef0fedfbe30893632fc7 [^]

Related to ISSUE-50635: Update discount property tests
* DicountCRMFilters should be added to database when discount tests
  are executed
* NumberComparatorTypeTest should use Number Property "xZIP"
  instead of String property "xPhone2"
* DiscountPropertyCRMFilters should be grouped by "offerId" property
  instead of default group property "priceAdjustment"

---
A src-test/org/openbravo/discounts/propertycondition/model/DiscountPropertyCRMBOBHook.java
M src-test/org/openbravo/discounts/propertycondition/DiscountPropertyConditionComparatorsTest.java
M src-test/org/openbravo/discounts/propertycondition/comparators/DateComparatorTypeTest.java
M src-test/org/openbravo/discounts/propertycondition/comparators/ListComparatorTypeTest.java
M src-test/org/openbravo/discounts/propertycondition/comparators/NumberComparatorTypeTest.java
M src-test/org/openbravo/discounts/propertycondition/utils/CRMUtils.java
M src/org/openbravo/discounts/propertycondition/DiscountPropertyCRMDataHook.java
M web/org.openbravo.discounts.propertycondition/js/propertyConditionDiscount.js
---
(0143852)
hgbot   
2022-11-21 07:46   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.discounts.propertycondition/-/merge_requests/19 [^]
(0143853)
hgbot   
2022-11-21 07:46   
Merge request merged: https://gitlab.com/openbravo/ci/modules/org.openbravo.retail.discounts.tests/-/merge_requests/5 [^]
(0143854)
hgbot   
2022-11-21 07:46   
Repository: https://gitlab.com/openbravo/ci/modules/org.openbravo.retail.discounts.tests [^]
Changeset: 2c3b160b9ba2dc2ca726dbfcf7758cc163713248
Author: Ranjith S R <ranjith@qualiantech.com>
Date: 12-11-2022 17:52:43
URL: https://gitlab.com/openbravo/ci/modules/org.openbravo.retail.discounts.tests/-/commit/2c3b160b9ba2dc2ca726dbfcf7758cc163713248 [^]

Related to ISSUE-50635: Enabled Junit tests

---
M src-test/org/openbravo/retail/discounts/tests/DiscountsMainTestSuite.java
---
(0143912)
hgbot   
2022-11-21 13:44   
Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2 [^]
Changeset: ffbf2503df35bbe7014587329d35b1b432a2daf1
Author: Ranjith S R <ranjith@qualiantech.com>
Date: 21-11-2022 18:12:10
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/commit/ffbf2503df35bbe7014587329d35b1b432a2daf1 [^]

Related to ISSUE-50635: Added DiscountRule param to DiscountRuleBOBHook method
* Added DiscountRule param to DiscountRuleBOBHook's createExtraSettings method
  to get more information about discount like json etc.

---
M src-test/org/openbravo/pos2/storeset/discount/StoreSetDiscountRuleBOBHook.java
---
(0144447)
hgbot   
2022-12-06 07:47   
Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.discounts.propertycondition [^]
Changeset: a621f20d66229c99f9d3f1b5bfdbe0e97dae6174
Author: Ranjith S R <ranjith@qualiantech.com>
Date: 06-12-2022 12:17:13
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.discounts.propertycondition/-/commit/a621f20d66229c99f9d3f1b5bfdbe0e97dae6174 [^]

Related to ISSUE-50635: Fixed DateComparator discountproperty tests
* Fixed DateComparator Before Today, After Today, Greater Than & Less Than tests

---
M src-test/org/openbravo/discounts/propertycondition/comparators/DateComparatorTypeTest.java
---
(0145129)
hgbot   
2023-01-03 07:54   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.discounts.propertycondition/-/merge_requests/22 [^]
(0145130)
hgbot   
2023-01-03 08:07   
Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.discounts.propertycondition [^]
Changeset: b41355581e785fe796d9a2ed7a9afa4749b7db63
Author: Ranjith S R <ranjith@qualiantech.com>
Date: 03-01-2023 12:22:42
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.discounts.propertycondition/-/commit/b41355581e785fe796d9a2ed7a9afa4749b7db63 [^]

Related to ISSUE-50635: Time should be compared in DateComparator
* Time shoule be compared instead of month's date in DateComparator

---
M src-test/org/openbravo/discounts/propertycondition/model/DiscountPropertyCRMBOBHook.java
M web/org.openbravo.discounts.propertycondition/js/engine/comparators/DateComparatorType.js
---
(0145131)
hgbot   
2023-01-03 08:07   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.discounts.propertycondition/-/merge_requests/22 [^]