Bug 1582873 - [Generic Object] Button added can cause exception page when clicked upon
Summary: [Generic Object] Button added can cause exception page when clicked upon
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Automate
Version: 5.9.0
Hardware: Unspecified
OS: Unspecified
Target Milestone: GA
: cfme-future
Assignee: drew uhlmann
QA Contact: Martin Kourim
Depends On:
TreeView+ depends on / blocked
Reported: 2018-05-27 15:30 UTC by Tsai Li Ming
Modified: 2018-07-24 12:09 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2018-07-24 12:09:52 UTC
Category: Bug
Cloudforms Team: ---
Target Upstream Version:

Attachments (Terms of Use)
error message (68.19 KB, image/png)
2018-05-27 15:30 UTC, Tsai Li Ming
no flags Details
Generic objects from service page (69.54 KB, image/png)
2018-06-01 16:43 UTC, Tsai Li Ming
no flags Details
Generic Object link (55.06 KB, image/png)
2018-06-01 16:43 UTC, Tsai Li Ming
no flags Details
Edit button on the generic object detail page (44.83 KB, image/png)
2018-06-01 16:44 UTC, Tsai Li Ming
no flags Details
dialog form (32.85 KB, image/png)
2018-06-01 16:46 UTC, Tsai Li Ming
no flags Details
mkourim-select_instance_and_click_button (26.95 KB, image/png)
2018-07-24 12:07 UTC, Martin Kourim
no flags Details
mkourim-edit_dialog (11.22 KB, image/png)
2018-07-24 12:08 UTC, Martin Kourim
no flags Details
mkourim-request_submitted (30.55 KB, image/png)
2018-07-24 12:08 UTC, Martin Kourim
no flags Details

Description Tsai Li Ming 2018-05-27 15:30:49 UTC
Created attachment 1442419 [details]
error message

Description of problem:

1. Created a Button that calls a Request, 'ansible_tower_job'. 
2. Creates a Generic object that associate with a Service.
3. Go the new Service and instance of the Generic Object. Click on edit button. After filling up dialog form, page errors out with "Couldn't find Service with 'id'=1000000000030 [service/show]"

1000000000030 is the Generic Object ID, and not the Service id that it is associated with. 

There are no indications that the ansible tower job template is being called. 

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

How reproducible:

Comment 2 Dave Johnson 2018-05-27 15:43:03 UTC
Please assess the impact of this issue and update the severity accordingly.  Please refer to https://bugzilla.redhat.com/page.cgi?id=fields.html#bug_severity for a reminder on each severity's definition.

If it's something like a tracker bug where it doesn't matter, please set the severity to Low.

Comment 3 Tsai Li Ming 2018-05-29 16:40:27 UTC
The exception page will occur in the following scenarios:

1. Create an Action button under the Generic Object (Automation -> Generic Object)

- Go to Service -> Instance, view the details of an instance and click on the button.

- The error will not happen if you are at the instance page, select an instance and click on the button. 

2. Create a Button under Automation -> Customization -> Button, under the Generic Object.

Comment 4 Tina Fitzgerald 2018-05-31 13:51:42 UTC

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

Comment 5 Tsai Li Ming 2018-05-31 14:23:01 UTC
This should not be a duplicate #1583764. I will update the title to reflect the Exception page.

Comment 6 drew uhlmann 2018-05-31 15:09:53 UTC
It'd be useful to have the dialog attached to this ticket, as well as any automation code running, please.

Comment 7 Tsai Li Ming 2018-06-01 16:43:00 UTC
Created attachment 1446739 [details]
Generic objects from service page

Comment 8 Tsai Li Ming 2018-06-01 16:43:36 UTC
Created attachment 1446740 [details]
Generic Object link

Comment 9 Tsai Li Ming 2018-06-01 16:44:16 UTC
Created attachment 1446741 [details]
Edit button on the generic object detail page

Comment 10 Tsai Li Ming 2018-06-01 16:46:32 UTC
Created attachment 1446742 [details]
dialog form

Comment 11 Tsai Li Ming 2018-06-01 17:00:56 UTC
1. A static dialog form with a single text box is sufficient to trigger the Exception page.

2. The error won't happen if the button has no dialog form.

Comment 12 drew uhlmann 2018-06-19 19:19:11 UTC
Thanks for the screenshots but I need the dialog and automate domain.

Comment 13 drew uhlmann 2018-07-18 19:13:04 UTC
Hey Tsai can I please have an update about this ticket? I would really like to have a dialog export and automate code, not just screenshots, so I can replicate this.

Comment 14 drew uhlmann 2018-07-18 19:41:34 UTC
May I please have a reproducer?

Comment 15 Martin Kourim 2018-07-24 12:06:01 UTC
I was not able to reproduce the issue.


1. create service
POST /api/services
    "name": "myservice01",
    "display": true

2. create simple dialog with Text Box under Automation / Automate / Customization / Service Dialogs

3. create a generic object class
POST /api/generic_object_definitions
  "name": "myclass1",
  "description": "MyClass description"

4. create instance of the class
POST /api/generic_objects
   "generic_object_definition": {
      "id": "1"

5. add instance to the service
POST /api/services/1
    "action": "add_resource",
    "resource": { "resource": { "href": "https://<addr>/api/generic_objects/1" } }

6. create an "Edit" button under Automation / Automate / Generic Objects / All Generic Objects Classes / myclass1
and assign the dialog created in step 2, set "System/Process" to "Request" and "Request" to "ansible_tower_job"

7. go to Services / My Services / myservice01, click on number "1" after "Instances", select the instance (see attached screenshot)

8. click on the "Edit" button, edit the text box (see attached screenshot)

9. click Submit, see "Order Request was Submitted" with no error message (see attached screenshot)

Therefore this can be marked as "worksforme".

Comment 16 Martin Kourim 2018-07-24 12:07:24 UTC
Created attachment 1470278 [details]

Comment 17 Martin Kourim 2018-07-24 12:08:00 UTC
Created attachment 1470279 [details]

Comment 18 Martin Kourim 2018-07-24 12:08:33 UTC
Created attachment 1470280 [details]

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