Actions
Bug #1789
closedParent hostgroup name is truncated when its sub-group is a sub-string of the parent hostgroup name
Description
The name of a hostgroup is truncated in case the sub-hostgroup is a substring of its parent name: when "mi" group is created under "Rami" group - it looks like: "Ra/mi" instead of "Rami/mi"
Version:
foreman-1.0.0-1.el6.noarch
Files
Updated by Sam Kottler over 12 years ago
- Status changed from New to Feedback
I just spent a little while digging into this. This problem occurs in
app/helpers/hosts_and_hostgroups_helper.rbon line 5. The gsub method gets called on group.to_s, which is a complete string of the child hostgroup and all of its parents if there are any. Therefore, the name of the current group (group.name) without parents replaces all the instances of itself in group.to_s. The gsub should only get called on the substring after the last backslash (i.e. on "test", not "test/test").
I've spent enough time on this for today without a quick fix, so I'm going to move on, but I will revisit this later.
Updated by Sam Kottler over 12 years ago
- Status changed from Feedback to Pending
https://github.com/theforeman/foreman/pull/120 fixes this issue.
Updated by Ohad Levy over 12 years ago
- Category changed from Dashboard to Web Interface
- Assignee set to Sam Kottler
- Target version set to 1.1
Updated by Anonymous over 12 years ago
- Status changed from Pending to Closed
- % Done changed from 0 to 100
Applied in changeset 6e92e9a55bf4eea29fe1cf4c3e513e92191a60a2.
Actions