Project

General

Profile

Bug #17870

Saving an empty matcher for smart class parameter of type boolean saves the value false

Added by Ori Rabin over 2 years ago. Updated 11 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Smart Variables
Target version:
Difficulty:
Triaged:
Bugzilla link:
Team Backlog:
Fixed in Releases:
Found in Releases:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1357049

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.


Related issues

Related to Foreman - Bug #18718: Saving a boolean matcher with no value changes the value to falseClosed2017-02-28

Associated revisions

Revision d836a838 (diff)
Added by Ori Rabin over 2 years ago

Fixes #17870 - Empty boolean matcher should not turn into false

Revision 8e87207a (diff)
Added by Ori Rabin over 2 years ago

Fixes #17870 - Empty boolean matcher should not turn into false

(cherry picked from commit d836a8383f1188f23b6ffbffa1a8fbbf52bef139)

History

#1 Updated by Ori Rabin over 2 years ago

  • Status changed from New to Assigned
  • Assignee set to Ori Rabin
  • Target version set to 1.15.3

#2 Updated by The Foreman Bot over 2 years ago

  • Status changed from Assigned to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/4144 added

#3 Updated by Ori Rabin over 2 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100

#4 Updated by Dominic Cleal over 2 years ago

  • Legacy Backlogs Release (now unused) set to 210

#5 Updated by The Foreman Bot about 2 years ago

  • Pull request https://github.com/theforeman/foreman/pull/4345 added

#6 Updated by Ori Rabin about 2 years ago

  • Related to Bug #18718: Saving a boolean matcher with no value changes the value to false added

#7 Updated by Ori Rabin about 2 years ago

  • Pull request deleted (https://github.com/theforeman/foreman/pull/4345)

Also available in: Atom PDF