Bug 1595051

Summary: A custom button doesn't work on a service which has no parent catalog item associated with it.
Product: Red Hat CloudForms Management Engine Reporter: Nikhil Gupta <ngupta>
Component: AutomateAssignee: drew uhlmann <duhlmann>
Status: CLOSED CURRENTRELEASE QA Contact: Nikhil Dhandre <ndhandre>
Severity: medium Docs Contact:
Priority: high    
Version: 5.9.0CC: akarol, ccoupel, cpelland, dajohnso, dmetzger, duhlmann, gmccullo, jprause, mkanoor, ngupta, obarenbo, simaishi, tfitzger
Target Milestone: GAKeywords: Regression, Reopened, TestOnly, ZStream
Target Release: 5.10.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 5.10.0.5 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1603031 (view as bug list) Environment:
Last Closed: 2019-02-11 13:59:11 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: CFME Core Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1578510, 1603031    
Attachments:
Description Flags
Dialog
none
Custom button
none
Service
none
Submit none

Description Nikhil Gupta 2018-06-26 02:16:54 UTC
Description of problem:
A custom button doesn't work on a service which has no parent catalog item associated with it. Custom button created using a service dialog. 

Version-Release number of selected component (if applicable):
cfme-5.9.2

How reproducible:
Always

Steps to Reproduce:
1. Create a temporary service dialog.
2. Create a custom button in under 'Service' Object Types and link above service dialog to the button.
3. Go to Services -> My Services and try executing custom button on Service where 'Parent Catalog Item' is 'None'.

Actual results:
Nothing happens.

Expected results:
The submit button should work, call the automation and give acknowledgment(successful/Error) message.

Comment 2 Nikhil Gupta 2018-06-26 02:25:11 UTC
Created attachment 1454541 [details]
Dialog

Comment 3 Nikhil Gupta 2018-06-26 02:25:43 UTC
Created attachment 1454542 [details]
Custom button

Comment 4 Nikhil Gupta 2018-06-26 02:26:16 UTC
Created attachment 1454543 [details]
Service

Comment 5 Nikhil Gupta 2018-06-26 02:26:41 UTC
Created attachment 1454545 [details]
Submit

Comment 6 Nikhil Gupta 2018-06-26 02:28:00 UTC
Additional Info:
This is working on RHCF 4.5 but not working on 4.6

Comment 7 Greg McCullough 2018-06-26 14:36:07 UTC
Erik - Please review.  From automate you can create a service that is not directly derived from a service template.  The custom buttons are showing but but when running the custom button they are seeing two sets of buttons. (See the Submit image in comment #5)

Comment 8 drew uhlmann 2018-06-29 17:31:34 UTC
I know there are images attached. I saw them. I'm having a difficult time reproducing. May I please have an env to reproduce this on?

Comment 12 Greg McCullough 2018-07-03 22:30:05 UTC

*** This bug has been marked as a duplicate of bug 1568372 ***

Comment 14 Greg McCullough 2018-07-04 11:24:36 UTC
Nikhil - I validated this issue upstream and also against the latest test build of 5.9.3.4.

You will need to follow the proper hotfix request process to obtain the hotfix rpm.

I will leave the ticket open for the moment but believe that the proper status is closed - dup as I set previously.

Comment 16 Harpreet Kataria 2018-07-05 18:06:56 UTC
*** Bug 1595175 has been marked as a duplicate of this bug. ***

Comment 18 Greg McCullough 2018-07-13 11:59:32 UTC
There is an error in the api log:
[----] I, [2018-07-13T07:39:16.893192 #14154:4f1b680]  INFO -- : MIQ(Api::ServicesController.custom_action_resource) Invoking add nfs share on services id 99000000000032
[----] E, [2018-07-13T07:39:16.904206 #14154:4f1b680] ERROR -- : MIQ(Api::ServicesController.api_error) API Error
[----] E, [2018-07-13T07:39:16.904375 #14154:4f1b680] ERROR -- : MIQ(Api::ServicesController.api_error) Api::BadRequestError: Unsupported Custom Action add nfs share for the services resource specified
[----] I, [2018-07-13T07:39:16.905266 #14154:4f1b680]  INFO -- : MIQ(Api::ServicesController.log_request) Response:       {:completed_at=>"2018-07-13 11:39:16 UTC", :size=>"0.151 KBytes", :time_taken=>"0.033 Seconds", :status=>400}

Comment 19 drew uhlmann 2018-07-13 16:57:27 UTC
https://github.com/ManageIQ/manageiq/pull/17703