Bug #16378

check_override_selected checks changes not performed by user

Added by Ori Rabin 10 months ago. Updated 9 months ago.

Assigned To:Ori Rabin
Category:Smart Variables
Target version:Team Ivan Iteration 3
Difficulty: Bugzilla link:
Found in release: Pull request:https://github.com/theforeman/foreman/pull/3804
Story points-
Velocity based estimate-
Release1.13.1Release relationshipAuto


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.

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
Added by Ori Rabin 9 months ago

Fixes #16378 - Move default_value casting to lookup_key children


#1 Updated by The Foreman Bot 10 months ago

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

#2 Updated by Ivan Necas 10 months ago

  • Target version set to Team Ivan Iteration 3

#3 Updated by Ori Rabin 9 months ago

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

#4 Updated by Dominic Cleal 9 months ago

  • Category set to Smart Variables
  • Release set to 1.13.1

Also available in: Atom PDF