Bug 1443120 - Wrong flash message after ansible playbook catalog item deletion
Summary: Wrong flash message after ansible playbook catalog item deletion
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: UI - OPS
Version: 5.8.0
Hardware: All
OS: All
high
medium
Target Milestone: GA
: 5.9.0
Assignee: Harpreet Kataria
QA Contact: Dmitry Misharov
URL:
Whiteboard: ansible:service:ui
Depends On:
Blocks: 1445108
TreeView+ depends on / blocked
 
Reported: 2017-04-18 13:57 UTC by Dmitry Misharov
Modified: 2018-03-06 14:46 UTC (History)
5 users (show)

Fixed In Version: 5.9.0.1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1445108 (view as bug list)
Environment:
Last Closed: 2018-03-06 14:46:46 UTC
Category: ---
Cloudforms Team: ---
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Dmitry Misharov 2017-04-18 13:57:34 UTC
Description of problem:
From pivotal story: "The deletion of a service_template should be prevented if there is an associated JobTemplate for retirement and if there is at least one active service based on the service template.

If there is no retirement JobTemplate the service_template can be deleted.

If there is a retirement JobTemplate, check if there are any active (non-retired) services. https://www.pivotaltracker.com/story/show/142646939"
That behavior works as expected, but wrong flash message appears "The selected Catalog Item was deleted".

Version-Release number of selected component (if applicable):
5.8.0.10-beta1-nightly.20170414034628_b979a0b 

How reproducible:
Always

Steps to Reproduce:
1. Enable Embedded Ansible role.
2. Wait until it will be enabled.
3. Navigate to Automation/Ansible. Add some repository and credential.
4. Navigate to Services/Catalogs. Add "Ansible playbook" catalog item. Fill retirement tab.
5. Provision the service.
6. Try to delete the catalog item.

Actual results:
Catalog item is not deleted as expected, but "The selected Catalog Item was deleted" flash message appears.

Expected results:
The flash message should show related text, something like: "The selected Catalog Item hasn't been deleted due existing active service based on that catalog item"

Comment 3 CFME Bot 2017-04-24 22:28:09 UTC
New commit detected on ManageIQ/manageiq-ui-classic/master:
https://github.com/ManageIQ/manageiq-ui-classic/commit/78451fec0606a53faccb578aa8860f92df69eaf1

commit 78451fec0606a53faccb578aa8860f92df69eaf1
Author:     Harpreet Kataria <hkataria>
AuthorDate: Thu Apr 20 13:18:06 2017 -0400
Commit:     Harpreet Kataria <hkataria>
CommitDate: Thu Apr 20 13:18:06 2017 -0400

    Display error message correctly that is returned from model.
    
    Display correct flash message when there is an error deleting Catalog Item
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1443120

 app/controllers/catalog_controller.rb | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)

Comment 4 CFME Bot 2017-04-24 22:28:14 UTC
New commit detected on ManageIQ/manageiq-ui-classic/master:
https://github.com/ManageIQ/manageiq-ui-classic/commit/caccd8015df26de891b57bc979ffd0f45e083fb7

commit caccd8015df26de891b57bc979ffd0f45e083fb7
Author:     Harpreet Kataria <hkataria>
AuthorDate: Mon Apr 24 17:50:48 2017 -0400
Commit:     Harpreet Kataria <hkataria>
CommitDate: Mon Apr 24 17:50:48 2017 -0400

    Addressed PR feedback
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1443120

 app/controllers/catalog_controller.rb | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comment 6 Dmitry Misharov 2017-10-12 08:44:48 UTC
Verified in 5.9.0.2.20171010190026_0413a06. The flash message is correct.


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