Bug 1728600

Summary: Submit button is disabled when DatePicker and TimePicker fields set as required in dialog
Product: Red Hat CloudForms Management Engine Reporter: Niyaz Akhtar Ansari <nansari>
Component: UI - OPSAssignee: Martin Hradil <mhradil>
Status: CLOSED CURRENTRELEASE QA Contact: Niyaz Akhtar Ansari <nansari>
Severity: high Docs Contact: Red Hat CloudForms Documentation <cloudforms-docs>
Priority: medium    
Version: 5.10.7CC: bmidwood, dmetzger, hkataria, lavenel, mpovolny, obarenbo, simaishi
Target Milestone: GAKeywords: TestOnly, ZStream
Target Release: 5.11.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 5.11.0.16 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1731991 (view as bug list) Environment:
Last Closed: 2019-12-13 15:00:58 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: Bug
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: CFME Core Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1731991    

Description Niyaz Akhtar Ansari 2019-07-10 08:31:08 UTC
Description of problem:


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

How reproducible:
100%

Steps to Reproduce:
1. create a new service dialog with a datepicker field
2. Set datepicker field required in dialog
2. add the service dialog to the catalog
3. in the service catalog select the service dialog and click on order
4. Try to Submit button in order page

Actual results:
In service order page Submit button is disabled when DatePicker and TimePicker fields set as required in dialog.

Expected results:
Submit button should be active when select any value

Additional info:

https://bugzilla.redhat.com/show_bug.cgi?id=1702497#c4

Comment 3 Martin Hradil 2019-07-11 12:05:42 UTC
https://github.com/ManageIQ/ui-components/pull/401

Comment 4 CFME Bot 2019-07-19 13:23:52 UTC
New commits detected on ManageIQ/ui-components/master:

https://github.com/ManageIQ/ui-components/commit/14196161ae937ac3f23961c5250eacb6eea342e0
commit 14196161ae937ac3f23961c5250eacb6eea342e0
Author:     Martin Hradil <mhradil>
AuthorDate: Thu Jul 11 07:23:09 2019 -0400
Commit:     Martin Hradil <mhradil>
CommitDate: Thu Jul 11 07:23:09 2019 -0400

    dialogField.html - merge ng-switch-when for same type, add validation message to each

    only a few of the types would previously display the validation message on error
    adding to each type

    (and unified the switches to be able to tell which is which)

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

 src/dialog-user/components/dialog-user/dialogField.html | 60 +-
 1 file changed, 38 insertions(+), 22 deletions(-)


https://github.com/ManageIQ/ui-components/commit/1758d5bcad3605e10b266fc15fe62db226ef04ea
commit 1758d5bcad3605e10b266fc15fe62db226ef04ea
Author:     Martin Hradil <mhradil>
AuthorDate: Thu Jul 11 07:43:27 2019 -0400
Commit:     Martin Hradil <mhradil>
CommitDate: Thu Jul 11 07:43:27 2019 -0400

    dialogData.validateField - fix date required validation

    _.isEmpty(new Date()) is true, so no required date was valid
    switching to per-type switch, we only require the date to be a Date when required

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

 src/dialog-user/services/dialogData.ts | 48 +-
 1 file changed, 30 insertions(+), 18 deletions(-)

Comment 6 Niyaz Akhtar Ansari 2019-07-30 12:06:45 UTC
Verified in Version 5.11.0.16.20190724210259_2b4aa51