Uploaded image for project: 'Satellite'
  1. Satellite
  2. SAT-20436

Child hostgroup shows wrong "inherit parent" value in the selection options

XMLWordPrintable

    • Moderate
    • None

      Description of problem:
      If a child host group attribute is not currently inherit from the parent host group. The selection option will show the incorrect "inherit parent" value.

      Steps to Reproduce:
      1. In web ui, Create a parent host group and set the "Deploy On" to a compute resource. For example, "Brisbane Vcenter"
      2. In web ui, Create a child host group and set the "Deploy On" to a different compute resource. For example, "Sydney Vcenter".
      3. After creating the child host group. Edit the child host group, click the "Deploy on" select box

      Actual results:
      It is showing "Inherit parent (Sydney Vcenter)".

      Expected results:
      It should be showing "Inherit parent (Brisbane Vcenter)

      Additional info:

      Make the following change seems to fix the issue

      — a/helpers/form_helper.rb 2021-09-09 16:22:49.684921775 +1000
      +++ b/helpers/form_helper.rb 2021-09-09 16:23:05.679076650 +1000
      @@ -345,7 +345,7 @@

      def blank_or_inherit_f(f, attr, blank_value: _("no value"))
      return true unless f.object.respond_to?(:parent_id) && f.object.parent_id

      • inherited_value = f.object.send(attr)
        + inherited_value = f.object.respond_to?(:nested) ? f.object.nested(attr) : f.object.send(attr)
        inherited_value = inherited_value.name_method if inherited_value.present? && inherited_value.respond_to?(:name_method)
        inherited_value ||= blank_value
        _("Inherit parent (%s)") % inherited_value

            pondrejk@redhat.com Peter Ondrejka
            rhn-support-hyu Hao Chang Yu
            RH Bugzilla Integration RH Bugzilla Integration
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: