Project

General

Profile

Bug #9981

Smart variable doesn't show error on new variable

Added by Ori Rabin over 4 years ago. Updated about 1 year ago.

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

Description

Steps to reproduce:
1. create a new smart variable with parameter type integer and a matcher with the value 'abc'
2. try to save the puppetclass

Expected result: tab becomes red, next to value an error message "is invalid integer"

Actual result: the variable disappears and the puppetclass can't be saved

Workaround for now: save the puppetclass when the variable is empty (only parameter, type and default value) and then edit.
When the variable is updated the validations are shown correctly.


Related issues

Related to Foreman - Tracker #4470: Usability of parameters and overridesNew

Related to Foreman - Bug #8416: Puppetclasses edit n+1 queryClosed2014-11-16

Associated revisions

Revision de65857c (diff)
Added by Tom Caspy almost 4 years ago

fixes #9981 - making sure lookup_keys with errors get displayed if they're broken

History

#1 Updated by Ori Rabin over 4 years ago

  • Related to Tracker #4470: Usability of parameters and overrides added

#2 Updated by Walden Raines almost 4 years ago

  • Status changed from New to Assigned
  • Assignee set to Walden Raines

#3 Updated by Walden Raines almost 4 years ago

There are, in fact, two issues here.

1. If you don't enter a key then it saves the puppet class but does not attempt to save the new smart variable at all and spits you out on the puppetclasses list page
2. If you enter a key and also enter an invalid default value (a string for an int, for example) then the form marks itself as invalid but does not specify what the actual issue is

#4 Updated by The Foreman Bot almost 4 years ago

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

#5 Updated by Ori Rabin almost 4 years ago

  • Assignee changed from Walden Raines to Tom Caspy

#6 Updated by Dominic Cleal almost 4 years ago

  • Related to Bug #8416: Puppetclasses edit n+1 query added

#7 Updated by Dominic Cleal almost 4 years ago

  • Legacy Backlogs Release (now unused) set to 71

#8 Updated by Tom Caspy almost 4 years ago

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

Also available in: Atom PDF