Bug 1357049

Summary: Saving an empty matcher for smart class parameter of type boolean saves the value false
Product: Red Hat Satellite Reporter: Jitendra Yejare <jyejare>
Component: Smart VariablesAssignee: orabin
Status: CLOSED ERRATA QA Contact: Shimon Shtein <sshtein>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.2.0CC: bbuckingham, inecas, orabin, sshtein, tbrisker
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-02-21 16:44:36 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 Jitendra Yejare 2016-07-15 14:58:17 UTC
Description of problem:
'Required' functionality is not working for smart class parameter type 'boolean'.

Version-Release number of selected component (if applicable):
Sat 6.2 snap 19.1 GA

How reproducible:
Always

Steps to Reproduce:
1. Set default value for parameter type 'boolean' to true.
2. Select required checkbox to validate that value shouldnt be blank.
3. Create a matcher with empty/blank value.
4. Attempt to submit it.

Actual results:
The parameter is submitted by setting matcher value to 'false' automatically.

Expected results:
1. The parameter should not be submitted and should throw an error 'Value can't be blank'.
2. Autoset of boolean value to false for matcher should not happen.

Comment 2 orabin 2016-12-29 06:25:07 UTC
This is unrelated to the required flag.
The flag only affects hosts but empty values for matchers in smart class parameters are not allowed.

Comment 3 orabin 2016-12-29 06:35:45 UTC
Created redmine issue http://projects.theforeman.org/issues/17870 from this bug

Comment 4 Bryan Kearney 2016-12-29 07:07:24 UTC
Upstream bug assigned to orabin

Comment 5 Bryan Kearney 2016-12-29 07:07:27 UTC
Upstream bug assigned to orabin

Comment 6 Bryan Kearney 2016-12-29 15:07:19 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/17870 has been resolved.

Comment 8 Satellite Program 2018-02-21 16:44:36 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-2018:0336