Bug 1753237

Summary: Custom button: generic object buttons are not edited properly
Product: Red Hat CloudForms Management Engine Reporter: John Dupuy <jdupuy>
Component: UI - OPSAssignee: Zita Nemeckova <znemecko>
Status: CLOSED ERRATA QA Contact: Tasos Papaioannou <tpapaioa>
Severity: high Docs Contact: Red Hat CloudForms Documentation <cloudforms-docs>
Priority: medium    
Version: 5.11.0CC: akarol, bmidwood, duhlmann, gmccullo, hkataria, jdupuy, lavenel, mkanoor, mpovolny, obarenbo, simaishi
Target Milestone: GAKeywords: Regression, ZStream
Target Release: 5.11.5Flags: pm-rhel: cfme-5.11.z+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 5.11.5.0 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-05-05 13:43:09 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:

Description John Dupuy 2019-09-18 13:08:47 UTC
Description of problem:
Changes to generic object custom button "Request" does not persist after saving the button. 

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

How reproducible:
100%

Steps to Reproduce:
1. Create a "Generic Object Class"
2. Create a custom button that has the "Request" as "ca", leave the "Message" as "create", the other fields are not as important
3. Edit the custom button request to "call_instance" 
4. Click to edit the custom button again

Actual results:
The request field is now empty

Expected results:
the request field shouldn't be empty

Additional info:
It looks like the field is not properly saved. Two attributes are added to the custom button: "serivce_template" and "hosts" that were not there before

Comment 2 John Dupuy 2019-09-18 13:13:11 UTC
This is working in 5.10.10 properly, so I am marking it as a regression.

Comment 4 John Dupuy 2019-09-18 13:26:20 UTC
Note that this is only on buttons defined under a generic object class, i.e. breadcrumb:

Automation > Automate > Generic Objects > All Generic Object Classes 

If you create a button under generic objects in breadcrumb:

Automation > Automate > Customization > Object Types > Generic Object

And then edit the request, it saves properly

Comment 6 drew uhlmann 2019-09-19 18:24:20 UTC
May I please have a reproducer?

Comment 9 drew uhlmann 2019-09-19 21:20:04 UTC
Broken in https://github.com/ManageIQ/manageiq-ui-classic/pull/5166, assigning to UI team.

Comment 11 CFME Bot 2019-10-23 09:06:12 UTC
New commit detected on ManageIQ/manageiq-ui-classic/master:

https://github.com/ManageIQ/manageiq-ui-classic/commit/16f18e9807973c1e8b73621c6e9f64cba292481d
commit 16f18e9807973c1e8b73621c6e9f64cba292481d
Author:     Zita Nemeckova <znemecko>
AuthorDate: Tue Oct 22 07:48:08 2019 -0400
Commit:     Zita Nemeckova <znemecko>
CommitDate: Tue Oct 22 07:48:08 2019 -0400

    Fix edit of GOD custom button

    Request is not saved

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

 app/assets/javascripts/components/generic_object/main-custom-button-form.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comment 13 CFME Bot 2020-02-03 11:43:41 UTC
New commit detected on ManageIQ/manageiq-ui-classic/master:

https://github.com/ManageIQ/manageiq-ui-classic/commit/dc35d7fb5a13a1e3a75eec865fb6bd90329d7a12
commit dc35d7fb5a13a1e3a75eec865fb6bd90329d7a12
Author:     Zita Nemeckova <znemecko>
AuthorDate: Wed Jan 22 09:57:31 2020 -0500
Commit:     Zita Nemeckova <znemecko>
CommitDate: Wed Jan 22 09:57:31 2020 -0500

    Fixes extra attributes(:service_template, :hosts) from a user's custom attributes

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

 app/assets/javascripts/components/generic_object/main-custom-button-form.js | 35 +-
 1 file changed, 10 insertions(+), 25 deletions(-)

Comment 14 CFME Bot 2020-03-26 21:05:48 UTC
New commits detected on ManageIQ/manageiq-ui-classic/ivanchuk:

https://github.com/ManageIQ/manageiq-ui-classic/commit/e62d84e59555f9718d2015ce8a824075efafd2c7
commit e62d84e59555f9718d2015ce8a824075efafd2c7
Author:     Milan Zázrivec <mzazrivec>
AuthorDate: Wed Oct 23 09:03:47 2019 +0000
Commit:     Milan Zázrivec <mzazrivec>
CommitDate: Wed Oct 23 09:03:47 2019 +0000

    Merge pull request #6322 from ZitaNemeckova/fix_GOD_button_edit

    Fix edit of GOD custom button

    (cherry picked from commit c300913d3b469fe91838d2b2768b54c1b18eeab5)

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

 app/assets/javascripts/components/generic_object/main-custom-button-form.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


https://github.com/ManageIQ/manageiq-ui-classic/commit/717cfd5ad6836ad087e21b0c63fbe37c4e8aa62e
commit 717cfd5ad6836ad087e21b0c63fbe37c4e8aa62e
Author:     Milan Zázrivec <mzazrivec>
AuthorDate: Mon Feb  3 11:35:00 2020 +0000
Commit:     Milan Zázrivec <mzazrivec>
CommitDate: Mon Feb  3 11:35:00 2020 +0000

    Merge pull request #6632 from ZitaNemeckova/clean_GOD

    Fix extra attributes in GOD CustomButton edit page

    (cherry picked from commit e5623fe9f880193a2764b17bd58f2dcbd7384572)

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

 app/assets/javascripts/components/generic_object/main-custom-button-form.js | 35 +-
 1 file changed, 10 insertions(+), 25 deletions(-)

Comment 15 Tasos Papaioannou 2020-04-16 15:09:37 UTC
Verified on 5.11.5.0.

Comment 18 errata-xmlrpc 2020-05-05 13:43:09 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2020:2020