Bug 1447110

Summary: Ansible Playbook service catalog item update failed with new_dialog_name and dialog_id both exist
Product: Red Hat CloudForms Management Engine Reporter: Bill Wei <bilwei>
Component: AutomateAssignee: Bill Wei <bilwei>
Status: CLOSED CURRENTRELEASE QA Contact: Dmitry Misharov <dmisharo>
Severity: high Docs Contact:
Priority: high    
Version: 5.8.0CC: cpelland, dmisharo, jhardy, mkanoor, obarenbo, simaishi, tfitzger
Target Milestone: GAKeywords: TestOnly
Target Release: 5.9.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: ansible:service
Fixed In Version: 5.9.0.1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1447427 (view as bug list) Environment:
Last Closed: 2018-03-06 15:12:56 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: Ansible Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1447427    

Description Bill Wei 2017-05-01 19:00:43 UTC
Description of problem:
When the request config_info contains both new_dialog_name and dialog_id, the update process will fail with error dialog already exists.

The cause is we will try to create a new service dialog even if the dialog_id is already given. 

The fix should be using the given dialog_id and ignore the dialog name.

This problem was discovered while using rails console to test the update. OPS UI does not have the issue.

The fix is more preventive if the config_info comes from a REST API happens to contains both attributes.

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


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 3 CFME Bot 2017-05-02 17:31:49 UTC
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/ee74ab4cea7cb1f4581e95859c49f7ba5922a79c

commit ee74ab4cea7cb1f4581e95859c49f7ba5922a79c
Author:     Bill Wei <bilwei>
AuthorDate: Mon May 1 16:55:06 2017 -0400
Commit:     Bill Wei <bilwei>
CommitDate: Mon May 1 16:58:22 2017 -0400

    Prefer :dialog_id to :new_dialog_name in config_info
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1447110

 app/models/service_template_ansible_playbook.rb       | 13 +++++++------
 spec/models/service_template_ansible_playbook_spec.rb |  9 ++++-----
 2 files changed, 11 insertions(+), 11 deletions(-)

Comment 5 Dmitry Misharov 2017-10-16 09:20:51 UTC
Verified in 5.9.0.2.20171010190026_0413a06.