Red Hat Bugzilla – Bug 1152238
Nested location are not shown as nested
Last modified: 2017-02-23 15:52:47 EST
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:
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.
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.
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
Created attachment 947621 [details] Parent location
Created attachment 947622 [details] Create a nested location
Created attachment 947623 [details] Creating a nested location
Created attachment 947624 [details] Options in the nested location
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.
Created redmine issue http://projects.theforeman.org/issues/8087 from this bug
Proposed fix in: https://github.com/Katello/katello/pull/4763
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
Created attachment 965119 [details] Nested Location
*** Bug 1175775 has been marked as a duplicate of this bug. ***
This bug is slated to be released with Satellite 6.1.
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