Bug 1630385 - Service Catalogs: Cannot add new Service Catalog Item when "Display in Catalog" selected and no Catalog chosen
Summary: Service Catalogs: Cannot add new Service Catalog Item when "Display in Catalo...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: UI - OPS
Version: 5.10.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: GA
: 5.10.0
Assignee: Hilda Stastna
QA Contact: Niyaz Akhtar Ansari
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-09-18 13:37 UTC by Antonin Pagac
Modified: 2019-02-12 16:52 UTC (History)
8 users (show)

Fixed In Version: 5.10.0.20
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-02-12 16:52:58 UTC
Category: ---
Cloudforms Team: CFME Core
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
error from production.log (6.23 KB, text/plain)
2018-09-18 13:37 UTC, Antonin Pagac
no flags Details
screenshot adding Catalog Item (119.43 KB, image/png)
2018-09-18 13:38 UTC, Antonin Pagac
no flags Details

Description Antonin Pagac 2018-09-18 13:37:02 UTC
Description of problem:
In Services -> Catalogs, Catalog Items, cannot add new Service Catalog Item when checkbox "Display in Catalog" is checked and no particular Catalog is chosen at the same time.
The Add button is clickable but nothing happens in the UI when clicked. No error message in the UI.
Error is thrown in production.log. There is no error in evm.log.

If I choose a Catalog in the Catalog dropdown, everything works as expected and I can save the Service Catalog item fine.

This works in 5.9.4.7 as well as 5.8.5.1, so this is a regression.

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

How reproducible:
Always

Steps to Reproduce:
1. Have a Dialog created
   Automation -> Automate -> Customization; Service Disalogs; create new Dialog
2. Navigate to Services -> Catalogs; Catalog Items
3. Choose Configuration -> Add a new Catalog Item
4. Choose Catalog Item Type 'Generic' (works with others as well)
5. Input Name/Description, have the 'Display in Catalog' checkbox checked
6. Do NOT choose any Catalog from the dropdown
7. Choose the previously created Dialog from the Dropdown
8. Click Add

Actual results:
Nothing happens in UI, no change; Catalog Item not saved; no error message; error thrown in production.log

Expected results:
Catalog Item saved successfully OR error message in the UI with relevant information

Additional info:
In 5.8 and 5.9, this works fine

See screenshot and error from production.log

Comment 2 Antonin Pagac 2018-09-18 13:37:34 UTC
Created attachment 1484386 [details]
error from production.log

Comment 3 Antonin Pagac 2018-09-18 13:38:10 UTC
Created attachment 1484387 [details]
screenshot adding Catalog Item

Comment 8 CFME Bot 2018-09-20 15:37:39 UTC
New commit detected on ManageIQ/manageiq-ui-classic/master:

https://github.com/ManageIQ/manageiq-ui-classic/commit/5c9d1833ca472a1261e71960f55a912cf250aa48
commit 5c9d1833ca472a1261e71960f55a912cf250aa48
Author:     Hilda Stastna <hstastna>
AuthorDate: Wed Sep 19 09:12:05 2018 -0400
Commit:     Hilda Stastna <hstastna>
CommitDate: Wed Sep 19 09:12:05 2018 -0400

    Fix adding a new Service Catalog Item

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

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

Comment 9 Niyaz Akhtar Ansari 2018-10-08 07:25:55 UTC
It fails when Catalog Item Type is 'Vmware' (It works with generic)

Tested in Version 5.10.0.18.20181003162715_dfcff5a


Production Log:
[----] I, [2018-10-08T03:20:34.787511 #12139:496cb1c]  INFO -- :   Parameters: {"ignore_form_changes"=>"", "name"=>"asdsa", "description"=>"dsadsadsad", "display"=>"1", "catalog_id"=>"", "dialog_id"=>"3", "fqname"=>"/Service/Provisioning/StateMachines/ServiceProvision_Template/CatalogItemInitialization", "reconfigure_fqname"=>"", "retire_fqname"=>"/Service/Retirement/StateMachines/ServiceRetirement/Default", "long_description"=>"", "service__vm_filter"=>"0", "service__provision_type"=>"vmware", "service__number_of_vms"=>"1", "service__vm_name"=>"", "button"=>"add"}
[----] F, [2018-10-08T03:20:37.478565 #12139:496cb1c] FATAL -- : Error caught: [NoMethodError] undefined method `errors' for false:FalseClass
/opt/rh/cfme-gemset/bundler/gems/cfme-ui-classic-fa2620e2725d/app/controllers/catalog_controller.rb:940:in `atomic_req_submit'
/opt/rh/cfme-gemset/bundler/gems/cfme-ui-classic-fa2620e2725d/app/controllers/catalog_controller.rb:94:in `atomic_st_edit'
/opt/rh/cfme-gemset/bundler/gems/cfme-ui-classic-fa2620e2725d/app/controllers/catalog_controller.rb:74:in `servicetemplate_edit'
/opt/rh/cfme-gemset/gems/actionpack-5.0.7/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'
/opt/rh/cfme-gemset/gems/actionpack-5.0.7/lib/abstract_controller/base.rb:188:in `process_action'

Comment 10 Hilda Stastna 2018-10-09 11:35:51 UTC
Niyaz, 

for Catalog Item Type 'Vmware', it does not matter if any Catalog is selected from the dropdown or not (step 6 from Steps to reproduce) so I consider this as a slightly different bug.

Comment 11 Hilda Stastna 2018-10-10 15:31:46 UTC
fixing https://github.com/ManageIQ/manageiq-ui-classic/pull/4750

Comment 12 CFME Bot 2018-10-11 14:30:44 UTC
New commit detected on ManageIQ/manageiq-ui-classic/master:

https://github.com/ManageIQ/manageiq-ui-classic/commit/56e02919db1a7d07bb07d18c07d9188ac75efdb6
commit 56e02919db1a7d07bb07d18c07d9188ac75efdb6
Author:     Hilda Stastna <hstastna>
AuthorDate: Tue Oct  9 10:08:36 2018 -0400
Commit:     Hilda Stastna <hstastna>
CommitDate: Tue Oct  9 10:08:36 2018 -0400

    Fix adding a new Service Catalog Item for Vmware Catalog Item Type

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

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

Comment 13 CFME Bot 2018-10-11 14:30:55 UTC
New commit detected on ManageIQ/manageiq-ui-classic/hammer:

https://github.com/ManageIQ/manageiq-ui-classic/commit/470132be8367ddc6f06bab87f49cc6612c0f368a
commit 470132be8367ddc6f06bab87f49cc6612c0f368a
Author:     Harpreet Kataria <hkataria>
AuthorDate: Wed Oct 10 11:39:22 2018 -0400
Commit:     Harpreet Kataria <hkataria>
CommitDate: Wed Oct 10 11:39:22 2018 -0400

    Merge pull request #4750 from hstastna/Service_Catalogs_Cannot_add_new_Service_Catalog_Item2

    Fix adding a new Service Catalog Item for Vmware Catalog Item Type

    (cherry picked from commit d34a138465b54f66efb97dd752313d95544e09a1)

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

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

Comment 14 Niyaz Akhtar Ansari 2018-10-30 09:03:25 UTC
Able to add new Service Catalog Item when "Display in Catalog" selected and no Catalog chosen.
Verified in Version 5.10.0.21.20181023151612_4c11b0d


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