znuny / Znuny

Znuny/Znuny LTS is a fork of the ((OTRS)) Community Edition, one of the most flexible web-based ticketing systems used for Customer Service, Help Desk, IT Service Management.
https://www.znuny.org
GNU General Public License v3.0
335 stars 82 forks source link

Bug - Create New Phone Ticket TimeUnits not picking up Data Selected #464

Closed gody01 closed 6 months ago

gody01 commented 11 months ago

Environment

Expected behaviour

SysConfig Ticket::Frontend::AccountTime::Dropdown###001-TimeUnits has DataSelected entered.

Input Field shows correct Value (0 in my case)

When New Phone Ticket is created, selected and displayed value should be accepted and ticket created.

Actual behaviour

When creating New Phone Ticket DataSelected is displayed correctly.

When Submit button is pressed, Label of input field is colored red, and Value has to be reentered. Only for 001-TimeUnits, for 002-TimeUnits it is OK.

On all other tested dialogs it works OK, and picks up default value.

How to reproduce

Steps to reproduce the behavior:

Video: https://pannonia.gody.si/uploads/PhoneTicketTimeUnits.webm

  1. Go to 'Create New Phone Ticket...'
  2. Fill mandatory fields
  3. Click on 'Submit'
  4. See error at Time Units label

Additional information

https://pannonia.gody.si/uploads/PhoneTicketTimeUnits.webm

Screenshots

gody01 commented 11 months ago

In debug mode of Chrome, I can see, that on call Validate_TimeUnits Value="" instead '0' as shown. It seems, that this error is because it is not pop-up but regular window.

Just checked. Behaviour is same at Create New Email Ticket screen.

gody01 commented 11 months ago

In Pop-up dialogs thise element has Value assigned:

In Create Phone/Email Ticket this element has no value assigned:

gody01 commented 11 months ago

This patch seems to fix the problem. It looks like operator //= does not assign value to Hash reliably.

--- Kernel/Output/HTML/Layout/Ticket.pm 2023-06-14 10:18:57.000000000 +0200
+++ Custom/Kernel/Output/HTML/Layout/Ticket.pm  2023-07-25 17:35:29.442550465 +0200
@@ -1209,7 +1209,9 @@
             );
         }

-        $Param{TimeUnits} //= $DefaultTimeUnits;
+#        $Param{TimeUnits} //= $DefaultTimeUnits;
+        $Param{TimeUnits} = $DefaultTimeUnits;
+
         $LocalLayoutObject->Block(
             Name => 'TimeUnits',
             Data => \%Param,
rkaldung commented 10 months ago

@gody01 Please provide us the Znuny version where this issue can be reproduced.

gody01 commented 10 months ago

Hello,

Version is 6.5.3 (LTS). DataSelected (default numbers) has to be entered (I have 0 hours, 5 minutes). Don't use seconds.

If I don't change value in Hours than there is an error. If I change value in Hours, than no error appears.

Did You see video above, with steps to reproduce ? In other displays (popup instead of ordinari page for ticket creation) with same DataSelected there is no error, only on two create email ticket and create phone ticket pages.

rkaldung commented 8 months ago

internal issue 776

jepf commented 6 months ago

Fixed in next 6.5 and 7.0 releases.