Openbravo Issue Tracking System - POS2
View Issue Details
0054568POS2POSpublic2024-02-02 15:422024-02-12 16:20
lorenzofidalgo 
caristu 
immediateminoralways
closedfixed 
5
main 
24Q2 
QA functional test
2023-10-17
main
https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/commit/f35ca078047b33682c70833de0bf1f3d84463b49 [^]
No
0054568: [24Q1] Return Line Reason is set as "undefined" if no input is chosen
At the moment of selecting values in a Return Line, if the POS2 user chooses to insert no input, "undefined" is shown as value inside the ticket instead of an empty value or other proper solution.
This issue has been reproducible in 24Q1 (QA status) and it seems to come from the development that extends the Return Reason functionality. In older versions, the flows differ slightly but, now, the POS2 user receives a wrong value that was not shown previously.
Issue not reproducible in livebuilds 23Q4.1.
Configuration:
0-Login POS2 backoffice and go to "User Action Input" window.
1-Deactive all records except the following one:
"User Action": "Return Line"
"User Input"": "Return Line Reason".
2-Enter the previous aforementioned (in Step 1) record and set "Mandatory" as False and Active as True.
Save the modifications.

POS2 flow:
1-Login POS2 using CMS-2 terminal and centralmountains as user.
2-Add 1x "Avalanche transceiver" to the ticket.
3-Click the just added product line and, in the overlay, click "Return Line" button.
4-Without choosing value, click OK button. DEFECT: Realise "undefined" is shown as value in the ticket line (check attached images to see current and old behaviour).
No tags attached.
depends on backport 005463624Q1 closed caristu [24Q1] Return Line Reason is set as "undefined" if no input is chosen 
caused by feature request 0053576 closed Triage Platform Base User Action Inputs improvements 
png undefined.png (53,731) 2024-02-02 15:42
https://issues.openbravo.com/file_download.php?file_id=19434&type=bug
png

png NotOK.png (52,125) 2024-02-02 15:42
https://issues.openbravo.com/file_download.php?file_id=19435&type=bug
png

png OK.png (58,674) 2024-02-02 15:42
https://issues.openbravo.com/file_download.php?file_id=19436&type=bug
png
Issue History
2024-02-02 15:42lorenzofidalgoNew Issue
2024-02-02 15:42lorenzofidalgoAssigned To => Retail
2024-02-02 15:42lorenzofidalgoFile Added: undefined.png
2024-02-02 15:42lorenzofidalgoTriggers an Emergency Pack => No
2024-02-02 15:42lorenzofidalgoFile Added: NotOK.png
2024-02-02 15:42lorenzofidalgoFile Added: OK.png
2024-02-02 15:43lorenzofidalgoRegression level => QA functional test
2024-02-02 15:43lorenzofidalgoRegression introduced in release => main
2024-02-02 15:46lorenzofidalgoDescription Updatedbug_revision_view_page.php?rev_id=27459#r27459
2024-02-02 15:46lorenzofidalgoDescription Updatedbug_revision_view_page.php?rev_id=27460#r27460
2024-02-08 10:19caristuAssigned ToRetail => caristu
2024-02-09 07:54caristuRegression date => 2023-10-17
2024-02-09 07:54caristuRegression introduced by commit => https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/commit/f35ca078047b33682c70833de0bf1f3d84463b49 [^]
2024-02-09 07:54caristuRelationship addedcaused by 0053576
2024-02-09 07:55caristuStatusnew => scheduled
2024-02-09 09:16hgbotNote Added: 0160525
2024-02-12 16:19hgbotResolutionopen => fixed
2024-02-12 16:19hgbotStatusscheduled => closed
2024-02-12 16:19hgbotFixed in Version => 24Q1
2024-02-12 16:19hgbotNote Added: 0160636
2024-02-12 16:20hgbotNote Added: 0160637
2024-02-12 16:20hgbotFixed in Version24Q1 => 24Q2
2024-02-12 16:20hgbotNote Added: 0160638

Notes
(0160525)
hgbot   
2024-02-09 09:16   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/merge_requests/2418 [^]
(0160636)
hgbot   
2024-02-12 16:19   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2 [^]
Changeset: 4930df9399739d391fa8157d45427ead9b685b03
Author: Carlos Aristu <carlos.aristu@openbravo.com>
Date: 12-02-2024 15:18:45
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/commit/4930df9399739d391fa8157d45427ead9b685b03 [^]

fixes BUG-54568: inputs with undefined values are displayed in the UI

  The original TicketLineReturnReason component was not displaying
any reason information if no reason was provided by the user.

  After refactoring the component (now TicketLineReturnInputs) to
support displaying the information of multiple inputs, in this case the
property to get the information is not directly null but an array with
inputs whose values are undefined when the user does not provide them.

  Note that, of course, this problem only happened for those inputs
defined as non mandatory.

  Now the component takes into account this case and skips rendering the
information of those items in that array that has no value provided by
the user.

---
M web-jspack/org.openbravo.pos2/src/components/Ticket/TicketLines/TicketLineReturnInputs.jsx
M web-jspack/org.openbravo.pos2/src/components/Ticket/TicketLines/__test__/TicketLineReturnInputs.test.jsx
---
(0160637)
hgbot   
2024-02-12 16:20   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/merge_requests/2418 [^]
(0160638)
hgbot   
2024-02-12 16:20   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2 [^]
Changeset: 4342d795ab2a54163d0f3ecbbe2d7eff7d20d0c9
Author: Carlos Aristu <carlos.aristu@openbravo.com>
Date: 12-02-2024 15:20:33
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/commit/4342d795ab2a54163d0f3ecbbe2d7eff7d20d0c9 [^]

fixes BUG-54568: inputs with undefined values are displayed in the UI

---
M web-jspack/org.openbravo.pos2/src/components/Ticket/TicketLines/TicketLineReturnInputs.jsx
M web-jspack/org.openbravo.pos2/src/components/Ticket/TicketLines/__test__/TicketLineReturnInputs.test.jsx
---