Bug 1332406

Summary: when "Use Puppet default" is checked in "smart class parameter", the form should not validate the content of "Default value".
Product: Red Hat Satellite Reporter: Ranjan Kumar <rankumar>
Component: WebUIAssignee: satellite6-bugs <satellite6-bugs>
WebUI sub component: Foreman QA Contact: Katello QA List <katello-qa-list>
Status: CLOSED DUPLICATE Docs Contact:
Severity: unspecified    
Priority: unspecified CC: bbuckingham, mburgerh, riehecky
Version: 6.1.8   
Target Milestone: Unspecified   
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-06-02 17:13:37 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:

Description Ranjan Kumar 2016-05-03 06:55:14 UTC
Description of problem:
Go to Configure -> "Puppet Classes" -> "Select any puppet class" -> Click on the tab "Smart class parameter" and click on any listed parameter.

When we submit the form with below settings: 

Parameter Type = Hash
Default value = any string value 
Use Puppet Default = checked

then satellite webui throws error: "is invalid - Value to use when there is no match" and here the text box is kept in read only mode. 
But it should not validate the "default value" field because "Use Puppet default" field is checked. it should store the previous original content of "Default value" into the database. 

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


How reproducible:always

Actual results: When "Use Puppet default" is checked the current content of "Default value" should be ignored.


Expected results: Form should save the result, even wrong value is used in "default value" incase of "Use puppet default" is checked


Additional info: