Bug 1719889 - Breadcrumb inconsistency on Generic Object
Summary: Breadcrumb inconsistency on Generic Object
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: UI - OPS
Version: 5.11.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: GA
: 5.11.9
Assignee: Milan Zázrivec
QA Contact: Tasos Papaioannou
Red Hat CloudForms Documentation
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-06-12 16:31 UTC by Mike Shriver
Modified: 2020-11-05 22:05 UTC (History)
10 users (show)

Fixed In Version: 5.11.9.0
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-11-05 22:04:52 UTC
Category: Bug
Cloudforms Team: CFME Core
Target Upstream Version:
Embargoed:
simaishi: cfme-5.11.z+


Attachments (Terms of Use)
production.log excerpt showing NoMethodError and traceback (7.68 KB, text/plain)
2020-07-16 15:51 UTC, Tasos Papaioannou
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2020:4967 0 None None None 2020-11-05 22:05:03 UTC

Comment 5 CFME Bot 2019-06-18 14:26:31 UTC
New commit detected on ManageIQ/manageiq-ui-classic/master:

https://github.com/ManageIQ/manageiq-ui-classic/commit/30c2b53aa536601b442e30869ade918f161cffaa
commit 30c2b53aa536601b442e30869ade918f161cffaa
Author:     Zita Nemeckova <znemecko>
AuthorDate: Thu Jun 13 18:22:59 2019 -0400
Commit:     Zita Nemeckova <znemecko>
CommitDate: Thu Jun 13 18:22:59 2019 -0400

    Fix GOD breadcrumbs

    Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1719889

 app/assets/javascripts/miq_angular_application.js | 8 +
 app/controllers/generic_object_definition_controller.rb | 43 +-
 app/controllers/mixins/breadcrumbs_mixin.rb | 6 +-
 app/controllers/mixins/sandbox.rb | 1 +
 app/views/generic_object_definition/_generic_object_definition_form.html.haml | 1 +
 5 files changed, 40 insertions(+), 19 deletions(-)

Comment 9 CFME Bot 2020-07-02 17:25:51 UTC
New commit detected on ManageIQ/manageiq-ui-classic/ivanchuk:

https://github.com/ManageIQ/manageiq-ui-classic/commit/2b7318d9705053b299ca1873e184fd36c32ca3a4
commit 2b7318d9705053b299ca1873e184fd36c32ca3a4
Author:     Satoe Imaishi <simaishi>
AuthorDate: Thu Jul  2 17:21:38 2020 +0000
Commit:     Satoe Imaishi <simaishi>
CommitDate: Thu Jul  2 17:22:18 2020 +0000

    Merge pull request #7120 from ZitaNemeckova/fix_GOD_breadcrumbs

    [JANSA] Fix GOD breadcrumbs

    (cherry picked from commit f9b8eb73a48dc75d1a50c1828439caddf3e2d664)

    https://bugzilla.redhat.com/show_bug.cgi?id=1719889

 app/controllers/generic_object_definition_controller.rb | 4 +-
 1 file changed, 3 insertions(+), 1 deletion(-)

Comment 10 Tasos Papaioannou 2020-07-16 15:50:03 UTC
When trying to click on a generic object class definition in the 'Generic Object Classes' accordion menu, the browser returns an 'Unexpected error encountered' page, and production.log shows a NoMethodError because the 'role' method was called for a nil object:

---

[----] I, [2020-07-16T11:44:01.870915 #6651:2b1a2b0aeea0]  INFO -- : Started POST "/generic_object_definition/tree_select?id=root&text=All%2520Generic%2520Object%2520Classes" for XXX.XXX.XXX.XXX at 2020-07-16 11:44:01 -0400
[----] I, [2020-07-16T11:44:01.873956 #6651:2b1a2b0aeea0]  INFO -- : Processing by GenericObjectDefinitionController#tree_select as JS
[----] I, [2020-07-16T11:44:01.874022 #6651:2b1a2b0aeea0]  INFO -- :   Parameters: {"id"=>"root", "text"=>"All%20Generic%20Object%20Classes"}
[----] F, [2020-07-16T11:44:01.884515 #6651:2b1a2b0aeea0] FATAL -- : Error caught: [NoMethodError] undefined method `role' for nil:NilClass
/opt/rh/cfme-gemset/bundler/gems/cfme-ui-classic-4f48019154d0/app/controllers/application_controller.rb:2074:in `assert_accordion_and_tree_privileges'
/opt/rh/cfme-gemset/bundler/gems/cfme-ui-classic-4f48019154d0/app/controllers/application_controller/explorer.rb:181:in `tree_select'
/opt/rh/cfme-gemset/gems/actionpack-5.1.7/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'
/opt/rh/cfme-gemset/gems/actionpack-5.1.7/lib/abstract_controller/base.rb:186:in `process_action'
/opt/rh/cfme-gemset/gems/actionpack-5.1.7/lib/action_controller/metal/rendering.rb:30:in `process_action'
/opt/rh/cfme-gemset/gems/actionpack-5.1.7/lib/abstract_controller/callbacks.rb:20:in `block in process_action'
/opt/rh/cfme-gemset/gems/activesupport-5.1.7/lib/active_support/callbacks.rb:131:in `run_callbacks'
/opt/rh/cfme-gemset/gems/actionpack-5.1.7/lib/abstract_controller/callbacks.rb:19:in `process_action'

---

Attaching the full traceback.

Comment 11 Tasos Papaioannou 2020-07-16 15:51:20 UTC
Created attachment 1701418 [details]
production.log excerpt showing NoMethodError and traceback

Comment 12 Milan Zázrivec 2020-07-16 18:26:47 UTC
The traceback shown in comment #10 and comment #11 is unrelated to the problem
and the fix described here. I'm moving this back to ON_QA.

Comment 14 Tasos Papaioannou 2020-07-23 01:11:34 UTC
Tested on 5.11.7.1. I still see inconsistencies in the breadcrumbs when viewing generic objects:

1.) Click on Automation > Automate > Generic Objects

The breadcrumb is:

	Automation > Automate > Generic Objects (link) > All Generic Object Classes

2.) Add a generic object class named "gorp". Click on "gorp" in the accordion menu.

The breadcrumb is now:

	Automation > Automate > Generic Objects (link) > gorp

3.) Click on the "Generic Objects" link in the breadcrumb.

"gorp" is still selected in the accordion, and its details page is still displayed, but now the breadcrumb is:

	Automation > Automate > Generic Objects (link) > gorp (link) > Generic Object Class gorp

Clicking on the "Generic Objects" link in this breadcrumb leaves the breadcrumb, accordion selection, and details page unchanged, whereas if I instead click on the "gorp" link, the accordion and details page are unchanged but the breadcrumb changes to:

	Automation > Automate > Generic Objects (link) > gorp.

Comment 16 CFME Bot 2020-09-17 18:35:55 UTC
New commit detected on ManageIQ/manageiq-ui-classic/jansa:

https://github.com/ManageIQ/manageiq-ui-classic/commit/621eed4a300becd61897acb0c8606e8e15f199e8
commit 621eed4a300becd61897acb0c8606e8e15f199e8
Author:     Milan Zazrivec <mzazrivec>
AuthorDate: Wed Sep  2 14:04:56 2020 +0000
Commit:     Milan Zazrivec <mzazrivec>
CommitDate: Wed Sep  2 14:04:56 2020 +0000

    Correctly set x_node for GO definitions controller show_list

    https://bugzilla.redhat.com/show_bug.cgi?id=1719889

 app/controllers/generic_object_definition_controller.rb | 1 +
 1 file changed, 1 insertion(+)

Comment 17 CFME Bot 2020-09-30 18:10:45 UTC
New commit detected on ManageIQ/manageiq-ui-classic/ivanchuk:

https://github.com/ManageIQ/manageiq-ui-classic/commit/3cdbfee2888a8ed04482fc76325b8c74597b2971
commit 3cdbfee2888a8ed04482fc76325b8c74597b2971
Author:     Satoe Imaishi <simaishi>
AuthorDate: Thu Sep 17 18:32:26 2020 +0000
Commit:     Satoe Imaishi <simaishi>
CommitDate: Wed Sep 30 18:03:08 2020 +0000

    Merge pull request #7283 from mzazrivec/correctly_set_x_node_for_go

    [JANSA] Correctly set x_node for generic_object_definition_controller show_list()

    (cherry picked from commit 7b63a9685fedc08bf0b362d906c35529cd175616)

    https://bugzilla.redhat.com/show_bug.cgi?id=1719889

 app/controllers/generic_object_definition_controller.rb | 1 +
 1 file changed, 1 insertion(+)

Comment 18 Tasos Papaioannou 2020-10-28 14:48:10 UTC
Verified on 5.11.9.0.

1.) Click on Automation > Automate > Generic Objects

The breadcrumb is:

	Automation > Automate > Generic Objects (link) > All Generic Object Classes

2.) Add a generic object class named "gorp". Click on "gorp" in the accordion menu.

The breadcrumb is now:

	Automation > Automate > Generic Objects (link) > gorp

3.) Click on the "Generic Objects" link in the breadcrumb.

This takes me back to the 'All Generic Object Classes' page, and the breadcrumb changes accordingly:

	Automation > Automate > Generic Objects (link) > All Generic Object Classes

Comment 23 errata-xmlrpc 2020-11-05 22:04:52 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 (CloudForms 5.0.9 bug fix and enhancement update), 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/RHBA-2020:4967


Note You need to log in before you can comment on or make changes to this bug.