Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1152238

Summary: Nested location are not shown as nested
Product: Red Hat Satellite Reporter: Sergio Ocón-Cárdenas <soconcar>
Component: WebUIAssignee: Brad Buckingham <bbuckingham>
WebUI sub component: Katello QA Contact: Tazim Kolhar <tkolhar>
Status: CLOSED ERRATA Docs Contact:
Severity: medium    
Priority: medium CC: bbuckingham, bkearney, chrobert, cwelton, dcleal, kabbott, soconcar, sthirugn, tkolhar
Version: 6.0.4Keywords: Triaged
Target Milestone: Unspecified   
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
URL: http://projects.theforeman.org/issues/8087
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-08-12 05:17:59 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
screenshot of location edit
none
Parent location
none
Create a nested location
none
Creating a nested location
none
Options in the nested location
none
Nested Location none

Description Sergio Ocón-Cárdenas 2014-10-13 16:38:53 UTC
Description of problem:
Nested locations are not shown as nested. When you select a location and add a nested locatoin to it (using nested) a new location is created. Editing or modifying the new location does not refer to the parent location

Version-Release number of selected component (if applicable):
6.0.4

How reproducible:
Always

Steps to Reproduce:
1. Create a new location
2. Go to the location and press the arrow, choose Nest
3. A new locatoin is created, but it is not nested to anything. The API does not refer to parent, the GUI does not reflect relationship

Actual results:


Expected results:
New location should be 
https://satellite.sergio.cloud/locations/1-Madrid/5-pio-xii/nest
instead of:
https://satellite.sergio.cloud/locations/5-pio-xii/

When creating the new location, a parent should be chosen (no parent should be an option there)
When showing a location, parent-child tree should be visible (Pio-XII should be a child of Madrid)
When showing hosts, format should be 5 (of which 3 are children)
Actions to remove childrens, remove relationship to parent, should be present

Additional info:

Comment 1 RHEL Program Management 2014-10-13 16:43:03 UTC
Since this issue was entered in Red Hat Bugzilla, the release flag has been
set to ? to ensure that it is properly evaluated for this release.

Comment 3 Dominic Cleal 2014-10-16 13:38:13 UTC
Created attachment 947605 [details]
screenshot of location edit

I can't reproduce.  The location edit shows the parent ("France") as both a dropdown for editing, in the heading, the title bar and on the index page.

Comment 4 Sergio Ocón-Cárdenas 2014-10-16 14:20:59 UTC
Adding screenshots of lastest installation of Sat 6:
- Location
- Button to create a nested location
- Information about nested location

No parent information in this version

Comment 5 Sergio Ocón-Cárdenas 2014-10-16 14:21:42 UTC
Created attachment 947621 [details]
Parent location

Comment 6 Sergio Ocón-Cárdenas 2014-10-16 14:22:13 UTC
Created attachment 947622 [details]
Create a nested location

Comment 7 Sergio Ocón-Cárdenas 2014-10-16 14:23:35 UTC
Created attachment 947623 [details]
Creating a nested location

Comment 8 Sergio Ocón-Cárdenas 2014-10-16 14:24:52 UTC
Created attachment 947624 [details]
Options in the nested location

Comment 10 Dominic Cleal 2014-10-16 14:37:02 UTC
It appears to be caused by Katello hiding the parent select box on both locations and organisation pages, while it only intends to hide it on orgs.


$ cat app/overrides/add_organization_attributes.rb
# Remove Parent select box from org
Deface::Override.new(:virtual_path => "taxonomies/_step1",
                     :name => "remove_parent_organization_on_create",
                     :remove => 'code[erb-loud]:contains("select_f"):contains(":parent")'
                     )

Deface::Override.new(:virtual_path => "taxonomies/_form",
                     :name => "remove_parent_organization_on_edit",
                     :remove => 'code[erb-loud]:contains("select_f"):contains(":parent")'
                     )

taxonomies/_form and _step1 are used by both models, not just organisations, so it's having a wider effect than (probably) intended.

Comment 12 Brad Buckingham 2014-10-23 21:17:21 UTC
Created redmine issue http://projects.theforeman.org/issues/8087 from this bug

Comment 13 Brad Buckingham 2014-10-23 21:23:16 UTC
Proposed fix in:
    https://github.com/Katello/katello/pull/4763

Comment 14 Tazim Kolhar 2014-12-05 15:12:23 UTC
VERIFIED:


*** This bug is verified in upstream. This fix should eventually land in future downstream builds ***
Version Tested:

# rpm -qa | grep foreman
foreman-compute-1.8.0-0.develop.201412040955git563fa28.el7.noarch
ruby193-rubygem-foreman_discovery-1.4.1-1.el7.noarch
foreman-selinux-1.8.0-0.develop.201411281557gitf4a857f.el7.noarch
foreman-libvirt-1.8.0-0.develop.201412040955git563fa28.el7.noarch
ruby193-rubygem-foreman_bootdisk-4.0.2-1.el7.noarch
rubygem-hammer_cli_foreman_tasks-0.0.3-2.201409091410git163c264.git.0.988ca80.el7.noarch
foreman-ovirt-1.8.0-0.develop.201412040955git563fa28.el7.noarch
ruby193-rubygem-foreman_hooks-0.3.7-2.el7.noarch
foreman-postgresql-1.8.0-0.develop.201412040955git563fa28.el7.noarch
foreman-gce-1.8.0-0.develop.201412040955git563fa28.el7.noarch
foreman-vmware-1.8.0-0.develop.201412040955git563fa28.el7.noarch
ruby193-rubygem-foreman-tasks-0.6.9-1.el7.noarch
foreman-proxy-1.8.0-0.develop.201411261259git6ddd00d.el7.noarch
ibm-x3550m3-07.lab.eng.brq.redhat.com-foreman-proxy-1.0-1.noarch
ruby193-rubygem-foreman_docker-0.2.0-2.el7.noarch
rubygem-hammer_cli_foreman-0.1.3-1.201411121216git9381fc5.el7.noarch
foreman-1.8.0-0.develop.201412040955git563fa28.el7.noarch
ibm-x3550m3-07.lab.eng.brq.redhat.com-foreman-client-1.0-1.noarch
foreman-release-1.8.0-0.develop.201412040955git563fa28.el7.noarch

screen shot attached

Comment 15 Tazim Kolhar 2014-12-05 15:13:25 UTC
Created attachment 965119 [details]
Nested Location

Comment 16 Dominic Cleal 2014-12-18 15:29:08 UTC
*** Bug 1175775 has been marked as a duplicate of this bug. ***

Comment 17 Bryan Kearney 2015-08-11 13:36:11 UTC
This bug is slated to be released with Satellite 6.1.

Comment 18 errata-xmlrpc 2015-08-12 05:17:59 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2015:1592