Project

General

Profile

Bug #12342

Puppet classes disapear when changing environment after cloning hostgroup

Added by Alejandro Falcon 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

Found this issue on 1.9.2 and 1.10 RC1 as well
Steps to reproduce:
1- Clone a hostgroup with a parent.
2- Change new hostgroup environment to another containing the same classes.
3- Click on puppet classes tab and classes are gone.


Related issues

Related to Foreman - Bug #1477: Whenever you switch environment for a host group - the host group looses its puppet classes.Closed2012-01-29

Associated revisions

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

fixes #12342 - unsaved (new or cloned) hostgroups keep their puppetclasses

Unsaved hostgroups didn't respond correctly to individual_puppetclasses
because that method expects some objects to be saved in the DB. In case
of selecting a new environment, that lead to puppetclasses disappearing.
Solution is - when the object is not saved yet, fallback on the
puppetclasses method.

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

fixes #12342 - unsaved (new or cloned) hostgroups keep their puppetclasses

Unsaved hostgroups didn't respond correctly to individual_puppetclasses
because that method expects some objects to be saved in the DB. In case
of selecting a new environment, that lead to puppetclasses disappearing.
Solution is - when the object is not saved yet, fallback on the
puppetclasses method.

(cherry picked from commit 654d3beadd98e49adfa0f868266140322ed0c500)

History

#1 Updated by Dominic Cleal almost 4 years ago

  • Related to Bug #1477: Whenever you switch environment for a host group - the host group looses its puppet classes. added

#2 Updated by Dominic Cleal almost 4 years ago

  • Category set to Host groups

#3 Updated by The Foreman Bot almost 4 years ago

  • Status changed from New to Ready For Testing
  • Assignee set to Tom Caspy
  • Pull request https://github.com/theforeman/foreman/pull/2904 added

#4 Updated by Dominic Cleal almost 4 years ago

  • Legacy Backlogs Release (now unused) set to 63

#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