Bug 1692980

Summary: Datepicker Field Cannot be Set to Required
Product: Red Hat CloudForms Management Engine Reporter: Beate Guldenschuh-Bihannic <beate.guldenschuh-bihannic>
Component: UI - OPSAssignee: Roman Blanco <rblanco>
Status: CLOSED CURRENTRELEASE QA Contact: Niyaz Akhtar Ansari <nansari>
Severity: high Docs Contact: Red Hat CloudForms Documentation <cloudforms-docs>
Priority: high    
Version: 5.10.0CC: bmidwood, dmetzger, gmccullo, hkataria, lavenel, mkanoor, mpovolny, mshriver, obarenbo, rmahique, simaishi
Target Milestone: GAKeywords: TestOnly, ZStream
Target Release: 5.11.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 5.11.0.14 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1702497 (view as bug list) Environment:
Last Closed: 2019-12-13 15:01:09 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: 1702497    
Attachments:
Description Flags
Datepicker - no option to set field mandatory or not none

Description Beate Guldenschuh-Bihannic 2019-03-26 20:31:14 UTC
Created attachment 1548229 [details]
Datepicker - no option to set field mandatory or not

Description of problem:
Datepicker Field Cannot be Set to Required A normal Text Box field has more options like "Required", so a Ruby Method has to be written to make sure, the field is not empty, which however is not nice, as we do not get a useful error message on the screen when the field is empty.

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

How reproducible:
Create a new service dialog with a datepicker field and empty it, when in the Service Catalog, Order-mode.


Steps to Reproduce:
1.In Automation -> Automate -> Customization create a new service dialog and add a Datepicker field to it. Inspect the possible options. There is no "Required" option.

2. Add the service dialog to Services
3. Order via the service dialog 
4. Empty the datepicker field

Actual results:
Datepicker field has no option to set the field content to be required.

Expected results:
Datepicker field has an option to choose if the field content is required or not.

Additional info:

Comment 3 CFME Bot 2019-04-09 10:38:24 UTC
New commit detected on ManageIQ/ui-components/master:

https://github.com/ManageIQ/ui-components/commit/1e89fe6d65739665d248a70e222c434952c1165f
commit 1e89fe6d65739665d248a70e222c434952c1165f
Author:     Roman Blanco <rblanco>
AuthorDate: Wed Apr  3 07:14:52 2019 -0400
Commit:     Roman Blanco <rblanco>
CommitDate: Wed Apr  3 07:14:52 2019 -0400

    Allow datepicker field in service dialogs to be set as required

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

 src/dialog-editor/components/modal-field-template/date-time-control.html | 15 +
 1 file changed, 15 insertions(+)

Comment 5 Niyaz Akhtar Ansari 2019-05-07 11:09:59 UTC
In service order page Submit button is disabled when DatePicker and TimePicker fields set as required in dialog.

Hence failing this BZ.

Tested in Version 5.11.0.2.20190430174828_0e34dea

Comment 6 Satoe Imaishi 2019-07-08 15:10:28 UTC
https://github.com/ManageIQ/ui-components/pull/392

Comment 7 Niyaz Akhtar Ansari 2019-07-17 07:12:03 UTC
Verified in Version 5.11.0.14.20190710225033_cb17ff0