Bug 1583177

Summary: Timepicker doesn't pass correct timing on service order
Product: Red Hat CloudForms Management Engine Reporter: Niladri Roy <niroy>
Component: AutomateAssignee: eclarizi
Status: CLOSED CURRENTRELEASE QA Contact: Shveta <sshveta>
Severity: high Docs Contact:
Priority: high    
Version: 5.9.0CC: cpelland, dmetzger, duhlmann, eclarizi, jprause, mkanoor, obarenbo, simaishi, tfitzger
Target Milestone: GAKeywords: TestOnly, ZStream
Target Release: 5.10.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 5.10.0.15 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1603210 (view as bug list) Environment:
Last Closed: 2019-02-11 14:01:36 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: CFME Core Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1578510, 1603210    
Attachments:
Description Flags
service order
none
dialog options
none
rails c request view
none
UI view of request
none
request page start time
none
dialog used for testing none

Description Niladri Roy 2018-05-28 12:08:08 UTC
Description of problem:
The selected time in service dialog from the timepicker changes when the service is ordered

Version-Release number of selected component (if applicable):
5.9.1.2

How reproducible:
Always at Cu environment

Steps to Reproduce:
1. Order a service which has dialog with timepicker
2. Select specific time
3. Observe the output in the logs

Actual results:
The time is changed

Expected results:
Time should be same as what is assigned

Additional info:

Comment 2 Niladri Roy 2018-05-28 12:09:50 UTC
Created attachment 1443184 [details]
service order

Comment 3 Niladri Roy 2018-05-28 12:10:33 UTC
Created attachment 1443188 [details]
dialog options

Comment 9 Tina Fitzgerald 2018-06-12 22:18:14 UTC
Reproducer: 10.8.198.213

Service: time_picker_test

Dialog values displayed in request are incorrect

Actual request values are correct:


MiqRequest ID 5 contains the correct data:

 {:dialog=>{"dialog_from_date_time_control_1"=>"2018-06-05T04:00:00Z", "dialog_to_date_time_control_1"=>"2018-06-12T22:06:14Z"},

Comment 10 drew uhlmann 2018-06-13 19:49:21 UTC
Created attachment 1451012 [details]
rails c request view

Comment 11 drew uhlmann 2018-06-13 19:49:54 UTC
Created attachment 1451013 [details]
UI view of request

Comment 12 drew uhlmann 2018-06-13 19:50:28 UTC
It looks to me like the request itself is getting created with the wrong values, au contraire to what Tina said in comment 9.

Comment 23 CFME Bot 2018-07-13 08:57:33 UTC
New commit detected on ManageIQ/manageiq-ui-classic/master:

https://github.com/ManageIQ/manageiq-ui-classic/commit/de5d200a69340ffdecb4fd28255e81fcfa22d109
commit de5d200a69340ffdecb4fd28255e81fcfa22d109
Author:     Erik Clarizio <eclarizio>
AuthorDate: Wed Jul 11 12:53:45 2018 -0400
Commit:     Erik Clarizio <eclarizio>
CommitDate: Wed Jul 11 12:53:45 2018 -0400

    Fix date/time display on request screen

    https://bugzilla.redhat.com/show_bug.cgi?id=1583177

 app/views/shared/dialogs/_dialog_field_date_and_date_time_control.html.haml | 13 +-
 1 file changed, 7 insertions(+), 6 deletions(-)

Comment 24 CFME Bot 2018-07-17 13:48:32 UTC
New commit detected on ManageIQ/ui-components/master:

https://github.com/ManageIQ/ui-components/commit/9f334be3a0c1af2a9a56c9b4498545280a395699
commit 9f334be3a0c1af2a9a56c9b4498545280a395699
Author:     Erik Clarizio <eclarizio>
AuthorDate: Wed Jul 11 12:22:23 2018 -0400
Commit:     Erik Clarizio <eclarizio>
CommitDate: Wed Jul 11 12:22:23 2018 -0400

    Use separate 'changesHappened' update call for datetimepicker

    Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1583177

 src/dialog-user/components/dialog-user/dialogField.html | 6 +-
 src/dialog-user/components/dialog-user/dialogField.spec.ts | 29 +
 src/dialog-user/components/dialog-user/dialogField.ts | 23 +
 src/dialog-user/services/dialogData.spec.ts | 55 +
 src/dialog-user/services/dialogData.ts | 16 +
 5 files changed, 126 insertions(+), 3 deletions(-)

Comment 26 Shveta 2018-08-15 18:32:36 UTC
Logs are showing correct time , same as passed in dialog but request page shows wrong start time .

Logs 
====================
[----] I, [2018-08-15T14:30:51.933548 #12073:7cb0de8]  INFO -- : Q-task_id([r2_service_template_provision_task_2]) <AEMethod groupsequencecheck> 	ae_state_started: 2018-08-15 18:30:49 UTC
[----] I, [2018-08-15T14:30:51.934869 #12073:7cb0de8]  INFO -- : Q-task_id([r2_service_template_provision_task_2]) <AEMethod groupsequencecheck> 	ae_state_step: main
[----] I, [2018-08-15T14:30:51.936171 #12073:7cb0de8]  INFO -- : Q-task_id([r2_service_template_provision_task_2]) <AEMethod groupsequencecheck> 	ae_status_state: on_entry
[----] I, [2018-08-15T14:30:51.937396 #12073:7cb0de8]  INFO -- : Q-task_id([r2_service_template_provision_task_2]) <AEMethod groupsequencecheck> 	dialog_param_end_time: 2018-08-15T18:32:00Z
[----] I, [2018-08-15T14:30:51.938643 #12073:7cb0de8]  INFO -- : Q-task_id([r2_service_template_provision_task_2]) <AEMethod groupsequencecheck> 	dialog_param_hostname: abcde

Comment 27 Shveta 2018-08-15 18:33:03 UTC
Created attachment 1476256 [details]
request page start time

Comment 28 Shveta 2018-08-15 18:33:29 UTC
Created attachment 1476257 [details]
dialog used for testing

Comment 29 eclarizi 2018-08-31 16:57:38 UTC
I think I've figured out the issue.

The date/time picker should work normally if either the date or the time changes, but if you just leave it alone and attempt to submit, you end up with the 1970-01-01 00:00 date as what is submitted.

Shveta, if you actually change both the start and end time in your example dialog, does the request page then end up showing the correct times?

I've put together a fix:

https://github.com/ManageIQ/ui-components/pull/341

Comment 30 CFME Bot 2018-09-03 08:48:32 UTC
New commit detected on ManageIQ/ui-components/master:

https://github.com/ManageIQ/ui-components/commit/c3e1b097e2275231f1734f6198bf7530b5f3163d
commit c3e1b097e2275231f1734f6198bf7530b5f3163d
Author:     Erik Clarizio <eclarizio>
AuthorDate: Fri Aug 31 12:52:06 2018 -0400
Commit:     Erik Clarizio <eclarizio>
CommitDate: Fri Aug 31 12:52:06 2018 -0400

    Ensure DialogFieldDateTimeControl fields are properly initialized

    https://bugzilla.redhat.com/show_bug.cgi?id=1583177

 src/dialog-user/components/dialog-user/dialogField.ts | 4 +
 1 file changed, 4 insertions(+)

Comment 31 Shveta 2018-10-01 21:08:42 UTC
Fixed .
Verified in 5.10.0.17.20180927011235_1b5cf54