Bug 1424843 - Removing all folders from an accordion in Report Menu makes the Reports page display error
Summary: Removing all folders from an accordion in Report Menu makes the Reports page ...
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
medium
Target Milestone: GA
: 5.8.0
Assignee: Zita Nemeckova
QA Contact: Jiri Stefanisin
URL:
Whiteboard: report
Depends On:
Blocks: 1432093
TreeView+ depends on / blocked
 
Reported: 2017-02-19 19:22 UTC by myoder
Modified: 2017-06-12 16:52 UTC (History)
8 users (show)

Fixed In Version: 5.8.0.4
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1432093 (view as bug list)
Environment:
Last Closed: 2017-06-12 16:52:01 UTC
Category: Bug
Cloudforms Team: CFME Core
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description myoder 2017-02-19 19:22:26 UTC
Description of problem: 

When editing the Report Menu, if you remove all of the folders under an accordion, the reports page will not display for that user.


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


How reproducible:
Alwyas

Steps to Reproduce:
1. Navigate to Edit Report Menus
2. Select a group to edit and remove the Folder "Virtual Machines" from the accordion "Migration Readiness" and save.
3. The accordion "Migration Readiness" is now empty.
4. Login as a user from the group that was used to edit.
5. Navigate to Cloud Intel => Reports
6. "Unexpected error encountered" is displayed on the page.

Actual results:


Expected results:


Additional info:

Comment 2 Harpreet Kataria 2017-02-20 21:47:46 UTC
Zita,

Can you take a look at this, looks like it is blowing up while building reports tree when second level folder has been deleted. See error stack below:

[----] F, [2017-02-20T16:40:11.895109 #25112:29efc94] FATAL -- : Error caught: [NoMethodError] undefined method `each_with_index' for "":String
Did you mean?  each_line
/home/hkataria/dev/manageiq-ui-classic/app/presenters/tree_builder_report_reports.rb:49:in `x_get_tree_custom_kids'
/home/hkataria/dev/manageiq-ui-classic/app/presenters/tree_kids.rb:35:in `x_get_tree_kids'
/home/hkataria/dev/manageiq-ui-classic/app/presenters/tree_builder.rb:242:in `x_get_tree_objects'
/home/hkataria/dev/manageiq-ui-classic/app/presenters/tree_builder.rb:266:in `x_build_node'
/home/hkataria/dev/manageiq-ui-classic/app/presenters/tree_builder.rb:287:in `x_build_node_tree'
/home/hkataria/dev/manageiq-ui-classic/app/presenters/tree_builder.rb:212:in `block in x_build_tree'
/home/hkataria/dev/manageiq-ui-classic/app/presenters/tree_builder.rb:207:in `map'
/home/hkataria/dev/manageiq-ui-classic/app/presenters/tree_builder.rb:207:in `x_build_tree'
/home/hkataria/dev/manageiq-ui-classic/app/presenters/tree_builder.rb:142:in `build_tree'
/home/hkataria/dev/manageiq-ui-classic/app/presenters/tree_builder.rb:26:in `initialize'
/home/hkataria/dev/manageiq-ui-classic/app/presenters/tree_builder_report_reports.rb:7:in `initialize'
/home/hkataria/dev/manageiq-ui-classic/app/controllers/application_controller/feature.rb:28:in `new'
/home/hkataria/dev/manageiq-ui-classic/app/controllers/application_controller/feature.rb:28:in `build_tree'
/home/hkataria/dev/manageiq-ui-classic/app/controllers/application_controller.rb:2409:in `block in build_accordions_and_trees'
/home/hkataria/dev/manageiq-ui-classic/app/controllers/application_controller.rb:2409:in `collect'
/home/hkataria/dev/manageiq-ui-classic/app/controllers/application_controller.rb:2409:in `build_accordions_and_trees'
/home/hkataria/dev/manageiq-ui-classic/app/controllers/report_controller.rb:133:in `explorer' 

Let me know if you have questions or need help recreating.

Thanks,
~Harpreet


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