Project

General

Profile

Bug #11965

Host group w/config group clone reports four "can't be blank" validation errors for name

Added by Dominic Cleal almost 4 years ago. Updated about 1 year ago.

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

Description

When cloning a host group, the "name" field is validated four times leading to an error on the form that says "can't be blank, can't be blank, can't be blank, and can't be blank".

Two of the instances come from a duplicate "validates :name" in hostgroup.rb itself and is easy to fix, but the extra one appears to be coming from something validating the model a second time.

Tested on b0eaf7f.

Associated revisions

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

fixes #11965 - hostgroup with config group - clone should not run validations more than once

History

#1 Updated by Dominic Cleal almost 4 years ago

  • Subject changed from Host group clone reports four "can't be blank" validation errors for name to Host group w/config group clone reports four "can't be blank" validation errors for name

It looks like it only happens when the host group has an associated config group. Validation appears to go from Hostgroup to ConfigGroup and back to Hostgroup somehow, causing it to run twice.

#2 Updated by The Foreman Bot almost 4 years ago

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

#3 Updated by Tom Caspy almost 4 years ago

  • Assignee set to Tom Caspy

#4 Updated by Dominic Cleal almost 4 years ago

  • Legacy Backlogs Release (now unused) set to 71

#5 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