Bug 1353042 - Control Explorer: Error when clicking on Edit assignments for this Alert Profile button
Summary: Control Explorer: Error when clicking on Edit assignments for this Alert Prof...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: UI - OPS
Version: 5.6.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: GA
: 5.7.0
Assignee: Keenan Brock
QA Contact: Dmitry Misharov
URL:
Whiteboard: ui:alert
Depends On:
Blocks: 1356647
TreeView+ depends on / blocked
 
Reported: 2016-07-05 21:26 UTC by Harpreet Kataria
Modified: 2017-01-12 05:14 UTC (History)
9 users (show)

Fixed In Version: 5.7.0.0
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1356647 (view as bug list)
Environment:
Last Closed: 2017-01-11 20:00:29 UTC
Category: ---
Cloudforms Team: ---
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Harpreet Kataria 2016-07-05 21:26:25 UTC
Description of problem:

The pages uses to assign an alert_profile to a resource are throwing exceptions.
So the page returns a 500, but since it is ajax, it just eats it.

Part of this looks like it was introduced in 91be50d but I'm unsure when this actually broke.

error reproduction:

    Go to alert profiles
    add an alert
    attempt to assign to a resource (add tags)
    nothing happens. rails console displays a bug



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


How reproducible:


Steps to Reproduce:
1.Go to alert profiles
2. add an alert Profile
3. Go to newly added Alert Profile summary
4. Press "Edit assignments for this Alert Profile" button from Configuration button group.
That throws an error in log:

[----] I, [2016-07-05T17:16:12.309001 #22803:1e1f694]  INFO -- : Started POST "/miq_policy/x_button/1000000000041?pressed=alert_profile_assign" for 127.0.0.1 at 2016-07-05 17:16:12 -0400
[----] I, [2016-07-05T17:16:12.351784 #22803:1e1f694]  INFO -- : Processing by MiqPolicyController#x_button as JS
[----] I, [2016-07-05T17:16:12.352465 #22803:1e1f694]  INFO -- :   Parameters: {"pressed"=>"alert_profile_assign", "id"=>"1000000000041"}
[----] I, [2016-07-05T17:16:12.968536 #22803:1e1f694]  INFO -- :   Rendered layouts/_flash_msg.html.haml (34.2ms)
[----] I, [2016-07-05T17:16:12.973235 #22803:1e1f694]  INFO -- :   Rendered miq_policy/_alert_profile_assign.html.haml (77.3ms)
[----] I, [2016-07-05T17:16:12.973642 #22803:1e1f694]  INFO -- :   Rendered miq_policy/_alert_profile_details.html.haml (186.6ms)
[----] F, [2016-07-05T17:16:12.974118 #22803:1e1f694] FATAL -- : Error caught: [ActionView::Template::Error] comparison of Array with Array failed
/home/hkataria/dev/manageiq/app/views/miq_policy/_alert_profile_assign.html.haml:16:in `sort'
/home/hkataria/dev/manageiq/app/views/miq_policy/_alert_profile_assign.html.haml:16:in `_app_views_miq_policy__alert_profile_assign_html_haml__1190464027167256710_69944919916440'
/home/hkataria/.rvm/gems/ruby-2.2.3/gems/actionview-5.0.0/lib/action_view/template.rb:158:in `block in render'
/home/hkataria/.rvm/gems/ruby-2.2.3/gems/activesupport-5.0.0/lib/active_support/notifications.rb:166:in `instrument'
/home/hkataria/.rvm/gems/ruby-2.2.3/gems/actionview-5.0.0/lib/action_view/template.rb:348:in `instrument'
/home/hkataria/.rvm/gems/ruby-2.2.3/gems/actionview-5.0.0/lib/action_view/template.rb:156:in `render'
/home/hkataria/.rvm/gems/ruby-2.2.3/gems/actionview-5.0.0/lib/action_view/renderer/partial_renderer.rb:343:in `render_partial'
/home/hkataria/.rvm/gems/ruby-2.2.3/gems/actionview-5.0.0/lib/action_view/renderer/partial_renderer.rb:311:in `block in render'
/home/hkataria/.rvm/gems/ruby-2.2.3/gems/actionview-5.0.0/lib/action_view/renderer/abstract_renderer.rb:42:in `block in instrument'
/home/hkataria/.rvm/gems/ruby-2.2.3/gems/activesupport-5.0.0/lib/active_support/notifications.rb:164:in `block in instrument'
/home/hkataria/.rvm/gems/ruby-2.2.3/gems/activesupport-5.0.0/lib/active_support/notifications/instrumenter.rb:21:in `instrument'
/home/hkataria/.rvm/gems/ruby-2.2.3/gems/activesupport-5.0.0/lib/active_support/notifications.rb:164:in `instrument'
/home/hkataria/.rvm/gems/ruby-2.2.3/gems/actionview-5.0.0/lib/action_view/renderer/abstract_renderer.rb:41:in `instrument'
/home/hkataria/.rvm/gems/ruby-2.2.3/gems/actionview-5.0.0/lib/action_view/renderer/partial_renderer.rb:310:in `render'
/home/hkataria/.rvm/gems/ruby-2.2.3/gems/actionview-5.0.0/lib/action_view/renderer/renderer.rb:47:in `render_partial'
/home/hkataria/.rvm/gems/ruby-2.2.3/gems/actionview-5.0.0/lib/action_view/renderer/renderer.rb:21:in `render'
/home/hkataria/.rvm/gems/ruby-2.2.3/gems/actionview-5.0.0/lib/action_view/helpers/rendering_helper.rb:32:in `render'
/home/hkataria/.rvm/gems/ruby-2.2.3/gems/haml-4.0.7/lib/haml/helpers/action_view_mods.rb:12:in `render_with_haml'
/home/hkataria/dev/manageiq/app/views/miq_policy/_alert_profile_details.html.haml:6:in `_app_views_miq_policy__alert_profile_details_html_haml___3436315604794997168_69944922589500'
/home/hkataria/.rvm/gems/ruby-2.2.3/gems/actionview-5.0.0/lib/action_view/template.rb:158:in `block in render'
/home/hkataria/.rvm/gems/ruby-2.2.3/gems/activesupport-5.0.0/lib/active_support/notifications.rb:166:in `instrument'
/home/hkataria/.rvm/gems/ruby-2.2.3/gems/actionview-5.0.0/lib/action_view/template.rb:348:in `instrument'
/home/hkataria/.rvm/gems/ruby-2.2.3/gems/actionview-5.0.0/lib/action_view/template.rb:156:in `render'
/home/hkataria/.rvm/gems/ruby-2.2.3/gems/actionview-5.0.0/lib/action_view/renderer/partial_renderer.rb:343:in `render_partial'
/home/hkataria/.rvm/gems/ruby-2.2.3/gems/actionview-5.0.0/lib/action_view/renderer/partial_renderer.rb:311:in `block in render'
/home/hkataria/.rvm/gems/ruby-2.2.3/gems/actionview-5.0.0/lib/action_view/renderer/abstract_renderer.rb:42:in `block in instrument'
/home/hkataria/.rvm/gems/ruby-2.2.3/gems/activesupport-5.0.0/lib/active_support/notifications.rb:164:in `block in instrument'
/home/hkataria/.rvm/gems/ruby-2.2.3/gems/activesupport-5.0.0/lib/active_support/notifications/instrumenter.rb:21:in `instrument'
/home/hkataria/.rvm/gems/ruby-2.2.3/gems/activesupport-5.0.0/lib/active_support/notifications.rb:164:in `instrument'
/home/hkataria/.rvm/gems/ruby-2.2.3/gems/actionview-5.0.0/lib/action_view/renderer/abstract_renderer.rb:41:in `instrument'
/home/hkataria/.rvm/gems/ruby-2.2.3/gems/actionview-5.0.0/lib/action_view/renderer/partial_renderer.rb:310:in `render'
/home/hkataria/.rvm/gems/ruby-2.2.3/gems/actionview-5.0.0/lib/action_view/renderer/renderer.rb:47:in `render_partial'
/home/hkataria/.rvm/gems/ruby-2.2.3/gems/actionview-5.0.0/lib/action_view/renderer/renderer.rb:21:in `render'
/home/hkataria/.rvm/gems/ruby-2.2.3/gems/actionview-5.0.0/lib/action_view/rendering.rb:103:in `_render_template'
/home/hkataria/.rvm/gems/ruby-2.2.3/gems/actionpack-5.0.0/lib/action_controller/metal/streaming.rb:217:in `_render_template'
/home/hkataria/.rvm/gems/ruby-2.2.3/gems/actionview-5.0.0/lib/action_view/rendering.rb:83:in `render_to_body'
/home/hkataria/.rvm/gems/ruby-2.2.3/gems/actionpack-5.0.0/lib/action_controller/metal/rendering.rb:52:in `render_to_body'
/home/hkataria/.rvm/gems/ruby-2.2.3/gems/actionpack-5.0.0/lib/action_controller/metal/renderers.rb:144:in `render_to_body'
/home/hkataria/.rvm/gems/ruby-2.2.3/gems/actionpack-5.0.0/lib/abstract_controller/rendering.rb:48:in `render_to_string'
/home/hkataria/.rvm/gems/ruby-2.2.3/gems/actionpack-5.0.0/lib/action_controller/metal/rendering.rb:41:in `render_to_string'
/home/hkataria/dev/manageiq/app/controllers/miq_policy_controller.rb:551:in `block in replace_right_cell'
/home/hkataria/dev/manageiq/app/controllers/miq_policy_controller.rb:702:in `[]'
/home/hkataria/dev/manageiq/app/controllers/miq_policy_controller.rb:702:in `replace_right_cell'
/home/hkataria/dev/manageiq/app/controllers/miq_policy_controller/alert_profiles.rb:104:in `alert_profile_assign'
/home/hkataria/dev/manageiq/app/controllers/miq_policy_controller.rb:136:in `x_button'

Actual results: Screen remains unchanged, error in log


Expected results: Should load Alert Profile assignment screen


Additional info: Upstream fix in PR: https://github.com/ManageIQ/manageiq/pull/9592

Comment 2 Keenan Brock 2016-07-06 00:15:32 UTC
Thanks so much harprete

This is on master.
Backporting to darga

Comment 4 Keenan Brock 2016-07-18 01:06:08 UTC
https://github.com/ManageIQ/manageiq/pull/9592

Comment 5 Dmitry Misharov 2016-09-09 09:04:43 UTC
Fixed and verified in 5.7.0.0.20160906172503_12f65cb. Alert Profile assignment screen is loaded. No errors in the log.


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