Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix removing catalog items from Catalog Bundle resource list #4822

Merged

Conversation

hstastna
Copy link

@hstastna hstastna commented Oct 24, 2018

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

Steps to reproduce:

  1. Go to Services -> Catalogs -> Catalog Items accordion
  2. Add two Catalog Items (if there are none; under Configuration -> Add a New Catalog Item)
  3. Add a new Catalog Bundle (Configuration -> Add a New Catalog Bundle)
  4. Edit the bundle from the previous step (Configuration -> Edit Selected/this Item)
  5. Go to Resources tab and try to remove one of the resources
    => error:
[----] I, [2018-10-24T16:16:47.118861 #8111:2ae71328083c]  INFO -- : Started POST "/catalog/resource_delete/60?grp_id=0&rec_id=120" for ::1 at 2018-10-24 16:16:47 +0200
[----] I, [2018-10-24T16:16:47.178274 #8111:2ae71328083c]  INFO -- : Processing by CatalogController#resource_delete as JS
[----] I, [2018-10-24T16:16:47.178406 #8111:2ae71328083c]  INFO -- :   Parameters: {"grp_id"=>"0", "rec_id"=>"120", "id"=>"60"}
[----] I, [2018-10-24T16:16:47.259176 #8111:2ae71328083c]  INFO -- :   Rendered /home/hstastna/manageiq/manageiq-ui-classic/app/views/layouts/_tree.html.haml (0.2ms)
[----] I, [2018-10-24T16:16:47.259339 #8111:2ae71328083c]  INFO -- :   Rendered /home/hstastna/manageiq/manageiq-ui-classic/app/views/shared/_tree.html.haml (0.7ms)
[----] I, [2018-10-24T16:16:47.259795 #8111:2ae71328083c]  INFO -- :   Rendered /home/hstastna/manageiq/manageiq-ui-classic/app/views/layouts/_ae_tree_select.html.haml (1.6ms)
[----] I, [2018-10-24T16:16:47.260613 #8111:2ae71328083c]  INFO -- :   Rendered /home/hstastna/manageiq/manageiq-ui-classic/app/views/catalog/_form_basic_info.html.haml (3.0ms)
[----] F, [2018-10-24T16:16:47.260795 #8111:2ae71328083c] FATAL -- : Error caught: [ActionView::Template::Error] no implicit conversion of nil into Array
/home/hstastna/manageiq/manageiq-ui-classic/app/views/catalog/_form_basic_info.html.haml:34:in `+'
/home/hstastna/manageiq/manageiq-ui-classic/app/views/catalog/_form_basic_info.html.haml:34:in `__home_hstastna_manageiq_manageiq_ui_classic_app_views_catalog__form_basic_info_html_haml___3332920349465668028_70343405187780'


Step 5 from steps to reproduce:
remove_item

Before:
nothing happens in the UI (same screenshot as above), error in long occurs

After:
removed_item2
bundle_saved

@hstastna
Copy link
Author

@miq-bot add_label bug, hammer/yes

@hstastna hstastna changed the title [WIP] Fix removing catalog items from Catalog Bundle resource list Fix removing catalog items from Catalog Bundle resource list Oct 24, 2018
@hstastna
Copy link
Author

@miq-bot remove_label wip

@miq-bot miq-bot removed the wip label Oct 24, 2018
@hstastna
Copy link
Author

@skateman Could you, please, check my spec? Thanks! 🌟

@mzazrivec mzazrivec self-assigned this Oct 25, 2018
@hstastna hstastna force-pushed the Unable_remove_catalog_items_Catalog_Bundle branch from 172500f to 87dcae8 Compare October 25, 2018 10:03
Add spec to check the fix in catalog controller
@hstastna hstastna force-pushed the Unable_remove_catalog_items_Catalog_Bundle branch from 87dcae8 to cec6ca3 Compare October 25, 2018 10:08
@miq-bot
Copy link
Member

miq-bot commented Oct 25, 2018

Checked commits hstastna/manageiq-ui-classic@e025500~...cec6ca3 with ruby 2.3.3, rubocop 0.52.1, haml-lint 0.20.0, and yamllint 1.10.0
2 files checked, 0 offenses detected
Everything looks fine. 🏆

Copy link
Member

@skateman skateman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Seal of Approval

@mzazrivec mzazrivec added this to the Sprint 98 Ending Nov 5, 2018 milestone Oct 25, 2018
@mzazrivec mzazrivec merged commit 34daad8 into ManageIQ:master Oct 25, 2018
simaishi pushed a commit that referenced this pull request Oct 25, 2018
…talog_Bundle

Fix removing catalog items from Catalog Bundle resource list

(cherry picked from commit 34daad8)

https://bugzilla.redhat.com/show_bug.cgi?id=1639557
@simaishi
Copy link
Contributor

Hammer backport details:

$ git log -1
commit f6a73d98f4dde493c7b3cac8fec931624c263714
Author: Milan Zázrivec <[email protected]>
Date:   Thu Oct 25 13:40:19 2018 +0200

    Merge pull request #4822 from hstastna/Unable_remove_catalog_items_Catalog_Bundle
    
    Fix removing catalog items from Catalog Bundle resource list
    
    (cherry picked from commit 34daad85cb744ac933c33a49af10ee9e1d394a5e)
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1639557

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants