Project

General

Profile

Bug #16378

check_override_selected checks changes not performed by user

Added by Ori Rabin almost 5 years ago. Updated almost 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Parameters
Target version:
Difficulty:
Triaged:
Bugzilla link:
Fixed in Releases:
Found in Releases:

Description

check_override_selected is run before validations when saving a smart class parameters.
Actions that are called before validation like cast_default_value can add changed attributes that are later checked and can cause a validation message.

Steps:
1) Import puppetclass with a boolean smart class parameter with the value 't' or 'f'
2) Edit the puppetclass and click save (without any changes)

The result should be that it saves since no changes were made.
Actual result: "override must be true to edit the parameter"

This is because when saving the default value is casted and changed to 'true'.
check_override_selected catches that change as something that is not allowed unless override is true.

Associated revisions

Revision 1ebc15ea (diff)
Added by Ori Rabin almost 5 years ago

Fixes #16378 - Move default_value casting to lookup_key children

Revision 8edec9ed (diff)
Added by Ori Rabin over 4 years ago

Fixes #16378 - Move default_value casting to lookup_key children

(cherry picked from commit 1ebc15ea40ebc4eaddc7afb8e83753841a724b1d)

History

#1 Updated by The Foreman Bot almost 5 years ago

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

#2 Updated by Ivan Necas almost 5 years ago

  • Target version set to 127

#3 Updated by Ori Rabin almost 5 years ago

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

#4 Updated by Dominic Cleal almost 5 years ago

  • Category set to Parameters
  • Legacy Backlogs Release (now unused) set to 190

Also available in: Atom PDF