Bug 1555331 - 400 Bad Request: When custom button used from infra provider object type with method and dialog both attached
Summary: 400 Bad Request: When custom button used from infra provider object type with...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: UI - OPS
Version: 5.9.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: GA
: 5.10.0
Assignee: eclarizi
QA Contact: Nikhil Dhandre
URL:
Whiteboard: custom_button:provider
Depends On: 1635797
Blocks: 1590346
TreeView+ depends on / blocked
 
Reported: 2018-03-14 13:46 UTC by Yadnyawalk Tale
Modified: 2019-02-11 14:05 UTC (History)
5 users (show)

Fixed In Version: 5.10.0.0
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1590346 (view as bug list)
Environment:
Last Closed: 2019-02-11 14:05:54 UTC
Category: Bug
Cloudforms Team: CFME Core
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
API Error: 400 Bad Request (76.38 KB, image/png)
2018-03-14 13:46 UTC, Yadnyawalk Tale
no flags Details

Description Yadnyawalk Tale 2018-03-14 13:46:34 UTC
Created attachment 1407983 [details]
API Error: 400 Bad Request

Description of problem:
This is exceptional use-case where you attach automate and dialog both feature to custom button. This is giving `400 Bad Request` API error which is blocking dialog to appear. 

Version-Release number of selected component (if applicable):
5.9.0.22.20180221205805_f93a675 

How reproducible:
Always

Steps to Reproduce:
1. Create dialog
2. Create instance and associative method 
Use simple ruby code behind method, for example: $evm.log("info", "CUSTOM_BUTTON_EXECUTED")
3. Create custom button for provider object type
4. Attach dialog (step1) and method (step2) to custom button
5. Goto Compute > Infra > Provider > Your provider detail page 
6. Execute custom button

When you select `Provider` object type with mentioned settings you will get custom button on following display pages:
a. Summery view of Infra provider page (*400 Bad Request*)
b. Dashboard view of Indra provider page (*400 Bad Request*)
c. Summery view of Cloud provider page (working)
d. Summery view of Containers provider page (working)
e. Dashboard view of Containers provider page (working)
f. Summery view of Containers provider page (working)
g. Dashboard view of Containers provider page (working)

Here a and b are vulnerable cases, however, custom button works well without dialog.  


Actual results:
Blocking dialog to appear on infra provider object type


Expected results:
Dialog should work on infra provider

Comment 4 Yadnyawalk Tale 2018-03-14 14:03:51 UTC
*Corrections: With the word 'automate' I mean 'automate method'.

Comment 8 CFME Bot 2018-04-04 14:31:43 UTC
New commit detected on ManageIQ/manageiq-ui-classic/master:

https://github.com/ManageIQ/manageiq-ui-classic/commit/181c5e2d60fcc46e582a51ce8976e14f2d0f328e
commit 181c5e2d60fcc46e582a51ce8976e14f2d0f328e
Author:     Erik Clarizio <eclarizio>
AuthorDate: Tue Apr  3 13:59:31 2018 -0400
Commit:     Erik Clarizio <eclarizio>
CommitDate: Tue Apr  3 13:59:31 2018 -0400

    Adjust target type for InfraManager custom buttons

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

 app/services/dialog_local_service.rb | 2 +
 spec/services/dialog_local_service_spec.rb | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)

Comment 11 Nikhil Dhandre 2018-11-01 11:24:23 UTC
tested with 5.10.0.22; Working without API error.


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