Bug 1269373 - In Smart Class Parameter, the validation for validator type 'list' is not working as expected.
Summary: In Smart Class Parameter, the validation for validator type 'list' is not wor...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Configuration Management
Version: Nightly
Hardware: Unspecified
OS: Unspecified
unspecified
high vote
Target Milestone: Unspecified
Assignee: orabin
QA Contact: Corey Welton
URL: http://projects.theforeman.org/issues...
Whiteboard: Verified in Upstream
Depends On:
Blocks: 1278718
TreeView+ depends on / blocked
 
Reported: 2015-10-07 07:03 UTC by Jitendra Yejare
Modified: 2019-09-25 20:51 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-07-27 08:57:30 UTC
Target Upstream Version:


Attachments (Terms of Use)
Screenshot of Validation failed. (133.02 KB, image/png)
2015-10-07 07:03 UTC, Jitendra Yejare
no flags Details


Links
System ID Priority Status Summary Last Updated
Foreman Issue Tracker 12078 None None None 2016-04-22 15:11:03 UTC
Red Hat Product Errata RHBA-2016:1500 normal SHIPPED_LIVE Red Hat Satellite 6.2 Base Libraries 2016-07-27 12:24:38 UTC

Description Jitendra Yejare 2015-10-07 07:03:38 UTC
Created attachment 1080535 [details]
Screenshot of Validation failed.

Description of problem:
After Overriding the value of Smart class Parameter and validating the new default value with validator type 'list' fails.

Version-Release number of selected component (if applicable):
foreman-1.10.0-0.develop.201510011619git0033595.el7.noarch
foreman-release-scl-1-1.el7.x86_64

How reproducible:
Always

Steps to Reproduce:
1. Override the default value of a smart class parameter.
2. Select the key type as array/string.
3. Give new default value as [1]/1. (Just an example, anything can be provided)
4. In Optional Input Validator, Select validator type as list.
5. In Validator Rule, give some list of values in which the new default value should be present. In my case its [1,2].
6. Try to submit this change.

Actual results:
1. Validation Failed.
2. Not allowing to submit the change and labelling '[1] is not one of [1,2]' or '1 is not one of [1,2]' for Default Value field.

Expected results:
Should be allowed to submit the change and validation should pass as obvious in above case.

Additional info:

Comment 3 Tazim Kolhar 2015-11-17 11:52:05 UTC
VERIFIED:
# rpm -qa | grep foreman
dell-pem600-01.rhts.eng.bos.redhat.com-foreman-proxy-client-1.0-1.noarch
foreman-release-1.11.0-0.develop.201511111740gitb2a959e.el7.noarch
foreman-ovirt-1.11.0-0.develop.201511111740gitb2a959e.el7.noarch
foreman-libvirt-1.11.0-0.develop.201511111740gitb2a959e.el7.noarch
foreman-postgresql-1.11.0-0.develop.201511111740gitb2a959e.el7.noarch
foreman-selinux-1.11.0-0.develop.201510071426git6234447.el7.noarch
tfm-rubygem-foreman_hooks-0.3.9-1.el7.noarch
tfm-rubygem-hammer_cli_foreman_tasks-0.0.8-1.el7.noarch
tfm-rubygem-foreman_gutterball-0.0.1-3.el7.noarch
dell-pem600-01.rhts.eng.bos.redhat.com-foreman-client-1.0-1.noarch
dell-pem600-01.rhts.eng.bos.redhat.com-foreman-proxy-1.0-2.noarch
tfm-rubygem-foreman_discovery-4.1.2-1.fm1_11.el7.noarch
foreman-1.11.0-0.develop.201511111740gitb2a959e.el7.noarch
tfm-rubygem-foreman_docker-1.4.1-2.fm1_10.el7.noarch
tfm-rubygem-hammer_cli_foreman_bootdisk-0.1.3-3.el7.noarch
foreman-debug-1.11.0-0.develop.201511111740gitb2a959e.el7.noarch
foreman-proxy-1.11.0-0.develop.201511111339git7cbe47a.el7.noarch
foreman-compute-1.11.0-0.develop.201511111740gitb2a959e.el7.noarch
tfm-rubygem-hammer_cli_foreman_docker-0.0.3-4.el7.noarch
tfm-rubygem-foreman_bootdisk-6.0.0-2.fm1_10.el7.noarch
tfm-rubygem-hammer_cli_foreman-0.4.0-1.201511111650gitdda13df.el7.noarch
foreman-gce-1.11.0-0.develop.201511111740gitb2a959e.el7.noarch
foreman-release-scl-1-1.el7.x86_64
foreman-vmware-1.11.0-0.develop.201511111740gitb2a959e.el7.noarch
tfm-rubygem-foreman-tasks-0.7.6-1.fm1_10.el7.noarch

steps:
1. Override the default value of a smart class parameter.
2. Select the key type as array/string.
3. Give new default value as [1]/1. (Just an example, anything can be provided)
4. In Optional Input Validator, Select validator type as list.
5. In Validator Rule, give some list of values in which the new default value should be present. In my case its [1,2].
6. Try to submit this change.

It allows to submit the change and validation passes as obvious in above case.

Comment 7 errata-xmlrpc 2016-07-27 08:57:30 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/RHBA-2016:1500


Note You need to log in before you can comment on or make changes to this bug.