Bug 1770292

Summary: Unable to remove icon via Web UI
Product: Red Hat CloudForms Management Engine Reporter: mheppler
Component: UI - OPSAssignee: Harpreet Kataria <hkataria>
Status: CLOSED DUPLICATE QA Contact: Parthvi Vala <pvala>
Severity: medium Docs Contact: Red Hat CloudForms Documentation <cloudforms-docs>
Priority: medium    
Version: 5.10.12CC: bmidwood, dmetzger, hkataria, lavenel, mpovolny, mshriver, obarenbo
Target Milestone: GA   
Target Release: 5.10.z   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-11-11 20:01:21 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 mheppler 2019-11-08 16:07:16 UTC
Description of problem:

When click to "Remove this Custom image" in Service Catalog, nothing happens. Does not matter how is icon set - UI or API

Production.log:

[----] I, [2019-11-08T16:53:12.005112 #13430:b3d954]  INFO -- : Started POST "/catalog/st_upload_image/1000000000002?pressed=remove" for 127.0.0.1 at 2019-11-08 16:53:12 +0100
[----] I, [2019-11-08T16:53:12.008111 #13430:b3d954]  INFO -- : Processing by CatalogController#st_upload_image as JS
[----] I, [2019-11-08T16:53:12.008175 #13430:b3d954]  INFO -- :   Parameters: {"pressed"=>"remove", "id"=>"1000000000002"}
[----] I, [2019-11-08T16:53:12.032966 #13430:b3d954]  INFO -- :   Rendered /opt/rh/cfme-gemset/bundler/gems/cfme-ui-classic-eaa3bad9bf8a/app/views/layouts/_flash_msg.html.haml (0.1ms)
[----] I, [2019-11-08T16:53:12.037710 #13430:b3d954]  INFO -- :   Rendered /opt/rh/cfme-gemset/bundler/gems/cfme-ui-classic-eaa3bad9bf8a/app/views/shared/_file_chooser.html.haml (0.1ms)
[----] I, [2019-11-08T16:53:12.038180 #13430:b3d954]  INFO -- :   Rendered /opt/rh/cfme-gemset/bundler/gems/cfme-ui-classic-eaa3bad9bf8a/app/views/catalog/_sandt_tree_show.html.haml (5.4ms)
[----] I, [2019-11-08T16:53:12.041343 #13430:b3d954]  INFO -- : Completed 200 OK in 33ms (Views: 2.2ms | ActiveRecord: 4.9ms)
[----] I, [2019-11-08T16:53:12.105298 #13430:b3d954]  INFO -- : Started GET "/pictures/1000000000076.png?91486724" for 127.0.0.1 at 2019-11-08 16:53:12 +0100
[----] I, [2019-11-08T16:53:12.108407 #13430:b3d954]  INFO -- : Processing by PictureController#show as PNG
[----] I, [2019-11-08T16:53:12.108527 #13430:b3d954]  INFO -- :   Parameters: {"91486724"=>nil, "basename"=>"1000000000076.png"}
[----] I, [2019-11-08T16:53:12.116146 #13430:b3d954]  INFO -- :   Rendering text template
[----] I, [2019-11-08T16:53:12.116251 #13430:b3d954]  INFO -- :   Rendered text template (0.0ms)
[----] I, [2019-11-08T16:53:12.116475 #13430:b3d954]  INFO -- : Completed 200 OK in 8ms (Views: 0.5ms | ActiveRecord: 1.2ms)

EVM.log:

[----] D, [2019-11-08T16:53:12.030696 #13430:b3d954] DEBUG -- : MIQ(Rbac::Authorizer#role_allows?) Auth successful for user 'admin', role 'EvmRole-super_administrator', feature identifier ''
[----] D, [2019-11-08T16:53:12.030916 #13430:b3d954] DEBUG -- : MIQ(Rbac::Authorizer#role_allows?) Auth successful for user 'admin', role 'EvmRole-super_administrator', feature identifier ''
[----] D, [2019-11-08T16:53:12.031113 #13430:b3d954] DEBUG -- : MIQ(Rbac::Authorizer#role_allows?) Auth successful for user 'admin', role 'EvmRole-super_administrator', feature identifier 'catalogitem_edit'
[----] D, [2019-11-08T16:53:12.031305 #13430:b3d954] DEBUG -- : MIQ(Rbac::Authorizer#role_allows?) Auth successful for user 'admin', role 'EvmRole-super_administrator', feature identifier 'catalogitem_delete'
[----] D, [2019-11-08T16:53:12.031538 #13430:b3d954] DEBUG -- : MIQ(Rbac::Authorizer#role_allows?) Auth successful for user 'admin', role 'EvmRole-super_administrator', feature identifier 'catalogitem_tag'


 No error visible.


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

CFME 5.10.12


How reproducible:

Add custom picture to service_template.


Steps to Reproduce:
1. Add custom picture to service template
2. click to Remove
3. click to remove again

Actual results:

custom picture still present


Expected results:

custom picture removed.


Additional info:

Comment 2 mheppler 2019-11-08 16:11:44 UTC
Picture is still set, verified via rails console:

irb(main):004:0> ServiceTemplate.find_each{ |s| puts s.picture.id; puts s.picture.image_href }
1000000000075
/pictures/1000000000075.png
1000000000076
/pictures/1000000000076.png
=> nil