Bug 1614369

Summary: [RFE] Service Dialog: Disable the 'Single value' switch in Tag Control when not applicable
Product: Red Hat CloudForms Management Engine Reporter: Antonin Pagac <apagac>
Component: UI - OPSAssignee: Roman Blanco <rblanco>
Status: CLOSED ERRATA QA Contact: Niyaz Akhtar Ansari <nansari>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 5.10.0CC: hkataria, lavenel, mpovolny, nansari, obarenbo, simaishi, smallamp
Target Milestone: GAKeywords: FutureFeature
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: Environment:
Last Closed: 2019-02-07 23:03:31 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Antonin Pagac 2018-08-09 13:51:09 UTC
Description of problem:
From bz 1540273:

"
Brant Evans 2018-02-05 17:20:04 EST

@eclarizi,

I think that is related to how the tag category is defined. A tag category has "Single Value" property. If set to true then only one value from that tag category can be assigned. If it is false then any number are able to be set.

The dialog element for a tag control sounds like it is working as I'd expect. If the category has "Single Value" set to true then a drop-down is displayed that only allows selecting one value. If set to false then the dialog element allows selecting multiple values.

"department" category has "Single Value" set to false. "environment" has "Single Value" set to true.

Brant
"

If there is a property that the user cannot change, don't display a switch that seems to be able to do so.
Right now, when the user sets the Single value switch to false (where not appropriate), it works without warning and the element and dialog can be saved. The switch is however ignored and single value dropdown is present in the dialog.

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

How reproducible:
Always

Steps to Reproduce:
1. Navigate to Automation -> Automate -> Customization; Service Dialogs; Configuration -> Add a new Dialog
2. Add the Tag Control item to the new Dialog
3. Edit the Tag Control item; in tab Options:
 - for Category select Environment
 - set the Single value switch to No
4. Save
5. Save the dialog
6. Observe single value dropdown

Actual results:
Single value dropdown displayed when Single value set to No

Expected results:
Don't display the Single value switch when it doesn't do anything

Additional info:

Comment 4 CFME Bot 2018-09-03 08:38:24 UTC
New commit detected on ManageIQ/ui-components/master:

https://github.com/ManageIQ/ui-components/commit/52f798bef26755bc581f81f84ef78ebfb7c2acb4
commit 52f798bef26755bc581f81f84ef78ebfb7c2acb4
Author:     Roman Blanco <rblanco>
AuthorDate: Wed Aug 22 09:56:06 2018 -0400
Commit:     Roman Blanco <rblanco>
CommitDate: Wed Aug 22 09:56:06 2018 -0400

    Hide 'Single Value' checkbox if it is not applicable

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

 src/dialog-editor/components/modal-field-template/tag-control.html | 3 +-
 src/dialog-editor/components/modal/modalComponent.ts | 1 +
 2 files changed, 3 insertions(+), 1 deletion(-)

Comment 5 Niyaz Akhtar Ansari 2018-10-31 09:36:21 UTC
Verified in Version 5.10.0.21.20181023151612_4c11b0d

Comment 6 errata-xmlrpc 2019-02-07 23:03:31 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2019:0212