Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0055589 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
defect | [POS2] Fashion | minor | always | 2024-05-24 18:55 | 2024-08-26 10:33 | |||
Reporter | ivazquez | View Status | public | |||||
Assigned To | sreehari | |||||||
Priority | normal | Resolution | fixed | Fixed in Version | ||||
Status | closed | Fix in branch | Fixed in SCM revision | |||||
Projection | none | ETA | none | Target Version | ||||
OS | Any | Database | Any | Java version | ||||
OS Version | Database version | Ant version | ||||||
Product Version | pi | SCM revision | ||||||
Review Assigned To | ||||||||
Regression level | ||||||||
Regression date | ||||||||
Regression introduced in release | pi | |||||||
Regression introduced by commit | ||||||||
Triggers an Emergency Pack | No | |||||||
Summary | 0055589: Error when trying to add loyalty points if you have not set the payment method “Gift Certificate”. | |||||||
Description | If you do not have the “Gift Certificate” payment method configured in the terminal you are using, when you try to add loyalty points to the business partner you will get the following error: Cannot read properties of undefined (reading 'paymentMethod') This is because of the following line of code: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.loyalty.burn.giftcertificate/-/blob/master/web-jspack/org.openbravo.retail.loyalty.burn.giftcertificate/src/utilities/utils.js?ref_type=heads#L89 [^] Reproduced in the following livebuild: https://livebuilds.openbravo.com/context/retail_pos2_modules_pgsql/web/pos/?terminal=VBS-2 [^] | |||||||
Steps To Reproduce | First, we have to ensure that we have configured “Loyalty Program” and “Loyalty Reason” in the back office. -After confirming this, go to POS2 using a terminal that does not have the “Gift Certificate” payment method configured (there is a Grouped Gift Certificate method which is not the same, it has to be specifically the “Gift Certificate” method). -Find a Business Partner who is a loyalty program member or add a loyalty subscription to a business partner. -Click on the business partner and in the drop-down menu click on “View Loyalty”. -At the bottom left, click “Add Loyalty Points”. -Set a “Reason”, put a point, and then click on “Add Points”. It will show you the error at the bottom left. Attached is a video reproducing the error | |||||||
Proposed Solution | If it is necessary to have this payment method configured for the Loyalty integration to work, it will show you a corresponding error message informing the customer to be set up to be able to add loyalty points. Adding information to the issue, even though a change has already been made, and that is that it does not exactly search for the “Gift Certificate” payment method, even though that is the name of the function that searches for it: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.loyalty.burn.giftcertificate/-/blob/master/web-jspack/org.openbravo.retail.loyalty.burn.giftcertificate/src/utilities/utils.js?ref_type=heads#L67 [^] If not, it searches for the payment method “Gift Card”, as you can see in this line of code where the constant is instantiated with the kind of this payment method: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.loyalty.burn.giftcertificate/-/blob/master/web-jspack/org.openbravo.retail.loyalty.burn.giftcertificate/src/utilities/utils.js?ref_type=heads#L15 [^] [^] So it would seem to me good that you also fix this code, giving a more descriptive and intuitive name to this function or, in case this payment method is wrong to be searched, that the instantiation of the constant is changed by setting the corresponding kind. | |||||||
Tags | No tags attached. | |||||||
Attached Files | loyaltyGiftcardCertificateProblem.mp4 [^] (2,043,670 bytes) 2024-05-24 18:55 | |||||||
Relationships [ Relation Graph ] [ Dependency Graph ] | |
Notes | |
(0165252) aaroncalero (manager) 2024-05-29 09:46 |
Developer note: in order to fix this, this hook [1] should check if the gift certificate payment method exists before calling setPaymentButtonLabel This can be done using the existing getGiftCertificatePaymentMethod method. [1]https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.loyalty.burn.giftcertificate/-/blob/master/web-jspack/org.openbravo.retail.loyalty.burn.giftcertificate/src/model/loyalty/user-actions/AddLoyaltyPointsActionPostHook.js?ref_type=heads [^] |
(0165286) hgbot (developer) 2024-05-30 08:36 |
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.loyalty.burn.giftcertificate/-/merge_requests/23 [^] |
(0165339) ivazquez (developer) 2024-05-30 15:37 edited on: 2024-06-25 18:21 |
Hello team, They added a note to the issue, even though a change has already been made, and that is that it does not exactly search for the “Gift Certificate” payment method, even though that is the name of the function that searches for it: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.loyalty.burn.giftcertificate/-/blob/master/web-jspack/org.openbravo.retail.loyalty.burn.giftcertificate/src/utilities/utils.js?ref_type=heads#L67 [^] If not, it searches for the payment method “Gift Card”, as you can see in this line of code where the constant is instantiated with the kind of this payment method: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.loyalty.burn.giftcertificate/-/blob/master/web-jspack/org.openbravo.retail.loyalty.burn.giftcertificate/src/utilities/utils.js?ref_type=heads#L15 [^] So it would seem good that you also fix this code, giving a more descriptive and intuitive name to this function or, in case this payment method is wrong to be searched, that the instantiation of the constant is changed by setting the corresponding kind. |
(0168448) hgbot (developer) 2024-08-26 10:32 |
Directly closing issue as related merge request is already approved. Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.loyalty.burn.giftcertificate [^] Changeset: c2c36ed23eb975122325e073ef7ce2d8a6602d81 Author: Sreehari Venkataraman <sreehari.venkataraman.ext@openbravo.com> Date: 26-08-2024 10:01:15 URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.loyalty.burn.giftcertificate/-/commit/c2c36ed23eb975122325e073ef7ce2d8a6602d81 [^] Fixes ISSUE-55589: Added getGiftCertificatePaymentMethod condition *now setPaymentButtonLabel function is executed when we have giftcertificate payment --- M web-jspack/org.openbravo.retail.loyalty.burn.giftcertificate/src/model/loyalty/user-actions/AddLoyaltyPointsActionPostHook.js --- |
(0168449) hgbot (developer) 2024-08-26 10:32 |
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.loyalty.burn.giftcertificate/-/merge_requests/23 [^] |
(0168450) aaroncalero (manager) 2024-08-26 10:33 |
Steps to validate: In an environment with a Loyalty Program configured, with a manual earn rule set up (including the points reason), and the org.openbravo.retail.loyalty.burn.giftcertificate installed (but no payment method configured). In POS, assign a customer subscribed to the loyalty program. Using the View Loyalty menu entry, add some points manually. Close the loyalty popup, add some products to the ticket and complete the transaction. Verify that no errors are raised during the process. |
Issue History | |||
Date Modified | Username | Field | Change |
2024-05-24 18:55 | ivazquez | New Issue | |
2024-05-24 18:55 | ivazquez | Assigned To | => Retail |
2024-05-24 18:55 | ivazquez | File Added: loyaltyGiftcardCertificateProblem.mp4 | |
2024-05-24 18:55 | ivazquez | Regression introduced in release | => pi |
2024-05-24 18:55 | ivazquez | Triggers an Emergency Pack | => No |
2024-05-24 18:56 | ivazquez | Proposed Solution updated | |
2024-05-29 09:46 | aaroncalero | Note Added: 0165252 | |
2024-05-29 09:46 | aaroncalero | Status | new => acknowledged |
2024-05-29 10:04 | sreehari | Assigned To | Retail => sreehari |
2024-05-29 10:04 | sreehari | Status | acknowledged => scheduled |
2024-05-30 08:36 | hgbot | Note Added: 0165286 | |
2024-05-30 15:37 | ivazquez | Note Added: 0165339 | |
2024-05-30 15:38 | ivazquez | Proposed Solution updated | |
2024-06-25 08:40 | egoitz | Severity | major => minor |
2024-06-25 18:20 | ivazquez | Proposed Solution updated | |
2024-06-25 18:21 | ivazquez | Note Edited: 0165339 | View Revisions |
2024-08-26 10:32 | hgbot | Resolution | open => fixed |
2024-08-26 10:32 | hgbot | Status | scheduled => closed |
2024-08-26 10:32 | hgbot | Note Added: 0168448 | |
2024-08-26 10:32 | hgbot | Note Added: 0168449 | |
2024-08-26 10:33 | aaroncalero | Note Added: 0168450 |
Copyright © 2000 - 2009 MantisBT Group |