Bug 1635797

Summary: [regression][Custom Button] Unexpected error encountered in infrastructure and datastore object type when method and dialog both attached
Product: Red Hat CloudForms Management Engine Reporter: Yadnyawalk Tale <ytale>
Component: UI - OPSAssignee: Zita Nemeckova <znemecko>
Status: CLOSED CURRENTRELEASE QA Contact: Nikhil Dhandre <ndhandre>
Severity: high Docs Contact: Red Hat CloudForms Documentation <cloudforms-docs>
Priority: high    
Version: 5.10.0CC: dmetzger, hkataria, jprause, lavenel, mpovolny, ndhandre, obarenbo, simaishi, znemecko
Target Milestone: GAKeywords: Regression, TestOnly, ZStream
Target Release: 5.10.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: custom_button
Fixed In Version: 5.10.0.21 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1641670 (view as bug list) Environment:
Last Closed: 2019-02-12 16:51:12 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: Bug
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: CFME Core Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1555331, 1574403, 1641670    
Attachments:
Description Flags
5.10.0.17_exception.png none

Description Yadnyawalk Tale 2018-10-03 16:58:46 UTC
Created attachment 1490188 [details]
5.10.0.17_exception.png

Description of problem:
Exception with unexpected error encountered in infrastructure and datastore  object type when method and dialog both attached.


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


How reproducible:
100%


Steps to Reproduce:
1. Create custom button for provider and datastore object type
2. Attach dialog (step1) and method (step2) to custom button
3. Goto Compute > Infra > Provider and Compute > Infra > Datastore (details page)
4. Execute custom button


Actual results:
Button should execute with dialog and method.


Expected results:
Giving following exception - "undefined local variable or method `open_url' for #<#<Class:0x00000000160f9018>:0x0000000014f1ce58> Did you mean? ops_url [storage/dialog_load]" 


Additional info:
Error not occurring with all custom button object types, only encountered with infra provider and datastore as of now.

Noticed there are some existing bugs related to same object type -
https://bugzilla.redhat.com/show_bug.cgi?id=1574403
https://bugzilla.redhat.com/show_bug.cgi?id=1555331

Comment 12 CFME Bot 2018-10-22 12:51:41 UTC
New commit detected on ManageIQ/manageiq-ui-classic/master:

https://github.com/ManageIQ/manageiq-ui-classic/commit/77b692a27f5040cdc2ed90d0408301c5e6fbbaa1
commit 77b692a27f5040cdc2ed90d0408301c5e6fbbaa1
Author:     Zita Nemeckova <znemecko>
AuthorDate: Tue Oct  9 04:49:40 2018 -0400
Commit:     Zita Nemeckova <znemecko>
CommitDate: Tue Oct  9 04:49:40 2018 -0400

    Fix error for Datastore custom button

    - Add open_url to local_options for non-explorer screens
    - Fix error handling when Automate does not return url

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

 app/assets/javascripts/controllers/dialog_user/dialog_user_controller.js | 20 +-
 app/views/shared/dialogs/_dialog_provision.html.haml | 1 +
 2 files changed, 13 insertions(+), 8 deletions(-)

Comment 14 CFME Bot 2018-10-23 13:01:52 UTC
New commit detected on ManageIQ/manageiq-ui-classic/hammer:

https://github.com/ManageIQ/manageiq-ui-classic/commit/75b755f67a943735f71dc492fb3a37e214e47f4d
commit 75b755f67a943735f71dc492fb3a37e214e47f4d
Author:     Martin Hradil <himdel>
AuthorDate: Mon Oct 22 08:41:32 2018 -0400
Commit:     Martin Hradil <himdel>
CommitDate: Mon Oct 22 08:41:32 2018 -0400

    Merge pull request #4745 from ZitaNemeckova/fix_error_handling_open_url

    Fix error for Datastore custom button

    (cherry picked from commit fe7f419cc67c659a3bcabadc63a2cb334c1d4aed)

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

 app/assets/javascripts/controllers/dialog_user/dialog_user_controller.js | 25 +-
 app/controllers/application_controller/buttons.rb | 3 +-
 app/views/shared/dialogs/_dialog_provision.html.haml | 1 +
 spec/javascripts/controllers/dialog_user/dialog_user_controller.spec.js | 10 +-
 4 files changed, 25 insertions(+), 14 deletions(-)