Bug 1635738 - Custom Button: Navigation with relationship table breaks button display on destination.
Summary: Custom Button: Navigation with relationship table breaks button display on de...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: UI - OPS
Version: 5.9.5
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: GA
: 5.10.0
Assignee: Roman Blanco
QA Contact: Nikhil Dhandre
Red Hat CloudForms Documentation
URL:
Whiteboard:
Depends On:
Blocks: 1645204
TreeView+ depends on / blocked
 
Reported: 2018-10-03 14:48 UTC by Nikhil Dhandre
Modified: 2019-02-12 16:50 UTC (History)
7 users (show)

Fixed In Version: 5.10.0.24
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1645204 (view as bug list)
Environment:
Last Closed: 2019-02-12 16:50:02 UTC
Category: ---
Cloudforms Team: CFME Core
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Nikhil Dhandre 2018-10-03 14:48:45 UTC
Description of problem:
----------------------
I found this error while automating the test. When we create the custom button for specific object suppose I created it for the host with a display for both Single and list option.
Now when I navigate to hosts directly I am able to see a custom button. but when I navigate through the provider relationship button I am not. 


Version-Release number of selected component (if applicable):
----------------------------------
I tested it with Version 5.9.5.0.20180927190514_e161d8f

How reproducible:
-----------------
Always


Steps to Reproduce:
------------------
1. Create a custom button for any object like VM/Host/Cluster with the display for option List/ single or list
2. Navigate to compute> Infra > Host   >>>> button display in toolbar
3. Navigate to compute> Infra > Provider > Select provider > Click  on host though relationship table
4. button will not display in a toolbar.

Actual results:
---------------
Button not display in the toolbar with a relationship navigation

Expected results:
-----------------
It should display

Additional info:
----------------
Attaching gif

Comment 8 CFME Bot 2018-10-30 13:31:37 UTC
New commit detected on ManageIQ/manageiq-ui-classic/master:

https://github.com/ManageIQ/manageiq-ui-classic/commit/828a7de27c4c8e606fca3655f865161d70e9db7c
commit 828a7de27c4c8e606fca3655f865161d70e9db7c
Author:     Roman Blanco <rblanco>
AuthorDate: Mon Oct 15 09:39:49 2018 -0400
Commit:     Roman Blanco <rblanco>
CommitDate: Mon Oct 15 09:39:49 2018 -0400

    Display custom buttons after comming from relationship table

    The code displays the custom buttons if the previous screen was a
    provider screen ('@record') and displayed item ('@ display') is from the list
    of classes supported by custom buttons ('APPLIES_TO_CLASS_BASE_MODELS')

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

 app/controllers/application_controller/buttons.rb | 25 +-
 app/controllers/mixins/custom_buttons.rb | 3 +
 app/helpers/application_helper/toolbar/mixins/custom_button_toolbar_mixin.rb | 49 +
 app/helpers/application_helper/toolbar_builder.rb | 3 +
 4 files changed, 57 insertions(+), 23 deletions(-)

Comment 10 CFME Bot 2018-11-02 14:14:21 UTC
New commit detected on ManageIQ/manageiq-ui-classic/hammer:

https://github.com/ManageIQ/manageiq-ui-classic/commit/19322dadedf1a99acf922c9e6de9e1674519ca67
commit 19322dadedf1a99acf922c9e6de9e1674519ca67
Author:     Martin Hradil <himdel>
AuthorDate: Tue Oct 30 09:31:25 2018 -0400
Commit:     Martin Hradil <himdel>
CommitDate: Tue Oct 30 09:31:25 2018 -0400

    Merge pull request #4775 from romanblanco/bz1635738-master

    Display custom buttons after comming from relationship table

    (cherry picked from commit 98b7dd0e893120c7d40391644306c35304137d60)

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

 app/controllers/application_controller.rb | 1 +
 app/controllers/application_controller/buttons.rb | 40 +-
 app/controllers/mixins/custom_buttons.rb | 2 +
 app/helpers/application_helper/toolbar/mixins/custom_button_toolbar_mixin.rb | 67 +
 app/helpers/application_helper/toolbar_builder.rb | 9 +-
 spec/controllers/ems_cloud_controller_spec.rb | 5 +
 spec/controllers/ems_container_controller_spec.rb | 4 +
 spec/controllers/ems_infra_controller_spec.rb | 32 +
 spec/controllers/ems_network_controller_spec.rb | 4 +
 spec/controllers/vm_infra_controller_spec.rb | 4 +
 spec/shared/controllers/shared_example_for_custom_buttons.rb | 11 +
 11 files changed, 148 insertions(+), 31 deletions(-)

Comment 11 CFME Bot 2018-11-02 14:14:52 UTC
New commit detected on ManageIQ/manageiq-ui-classic/hammer:

https://github.com/ManageIQ/manageiq-ui-classic/commit/19322dadedf1a99acf922c9e6de9e1674519ca67
commit 19322dadedf1a99acf922c9e6de9e1674519ca67
Author:     Martin Hradil <himdel>
AuthorDate: Tue Oct 30 09:31:25 2018 -0400
Commit:     Martin Hradil <himdel>
CommitDate: Tue Oct 30 09:31:25 2018 -0400

    Merge pull request #4775 from romanblanco/bz1635738-master

    Display custom buttons after comming from relationship table

    (cherry picked from commit 98b7dd0e893120c7d40391644306c35304137d60)

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

 app/controllers/application_controller.rb | 1 +
 app/controllers/application_controller/buttons.rb | 40 +-
 app/controllers/mixins/custom_buttons.rb | 2 +
 app/helpers/application_helper/toolbar/mixins/custom_button_toolbar_mixin.rb | 67 +
 app/helpers/application_helper/toolbar_builder.rb | 9 +-
 spec/controllers/ems_cloud_controller_spec.rb | 5 +
 spec/controllers/ems_container_controller_spec.rb | 4 +
 spec/controllers/ems_infra_controller_spec.rb | 32 +
 spec/controllers/ems_network_controller_spec.rb | 4 +
 spec/controllers/vm_infra_controller_spec.rb | 4 +
 spec/shared/controllers/shared_example_for_custom_buttons.rb | 11 +
 11 files changed, 148 insertions(+), 31 deletions(-)

Comment 12 CFME Bot 2018-11-12 16:08:40 UTC
New commit detected on ManageIQ/manageiq-ui-classic/hammer:

https://github.com/ManageIQ/manageiq-ui-classic/commit/9ebbd53043d6df7c2d4ed6a7797c3e79d242d380
commit 9ebbd53043d6df7c2d4ed6a7797c3e79d242d380
Author:     Milan Zázrivec <mzazrivec>
AuthorDate: Thu Nov  8 05:15:18 2018 -0500
Commit:     Milan Zázrivec <mzazrivec>
CommitDate: Thu Nov  8 05:15:18 2018 -0500

    Merge pull request #4887 from romanblanco/correct_rendering_for_list

    Corrected logic for rendering custom buttons

    (cherry picked from commit d8756412aa2362d0920ebddf2998f931f9465ee2)

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

 app/helpers/application_helper/toolbar_builder.rb | 20 +-
 1 file changed, 6 insertions(+), 14 deletions(-)

Comment 13 CFME Bot 2018-11-14 15:46:30 UTC
New commit detected on ManageIQ/manageiq-ui-classic/gaprindashvili:

https://github.com/ManageIQ/manageiq-ui-classic/commit/2d06c24b59da41d707e7458669ce8fc078d556a3
commit 2d06c24b59da41d707e7458669ce8fc078d556a3
Author:     Roman Blanco <rblanco>
AuthorDate: Mon Oct 15 09:39:49 2018 -0400
Commit:     Roman Blanco <rblanco>
CommitDate: Mon Oct 15 09:39:49 2018 -0400

    Display custom buttons after comming from relationship table

    The code displays the custom buttons if the previous screen was a
    provider screen ('@record') and displayed item ('@ display') is from the list
    of classes supported by custom buttons ('APPLIES_TO_CLASS_BASE_MODELS')

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

    (cherry picked from commit 828a7de)

 app/controllers/application_controller/buttons.rb | 27 +-
 app/controllers/mixins/custom_buttons.rb | 3 +
 app/helpers/application_helper/toolbar/mixins/custom_button_toolbar_mixin.rb | 49 +
 app/helpers/application_helper/toolbar_builder.rb | 3 +
 4 files changed, 58 insertions(+), 24 deletions(-)

Comment 14 Nikhil Dhandre 2018-11-26 11:32:22 UTC
Version 5.10.0.25.20181120211723_d2fd659

Tested with two objects cluster and Host working fine...


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