Bug 1300861

Summary: Unexpected UI error while editing report menus as tenant admin
Product: Red Hat CloudForms Management Engine Reporter: Nandini Chandra <nachandr>
Component: UI - OPSAssignee: Milan Zázrivec <mzazrivec>
Status: CLOSED ERRATA QA Contact: Nandini Chandra <nachandr>
Severity: high Docs Contact:
Priority: high    
Version: 5.5.0CC: bthurber, hkataria, jhardy, jprause, mpovolny, obarenbo
Target Milestone: GA   
Target Release: 5.6.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: ui:report
Fixed In Version: 5.6.0.0 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-06-29 15:32:26 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Nandini Chandra 2016-01-21 23:33:33 UTC
Description of problem:
-----------------------
UI blows up with this error while editing report menus as tenant admin.

Error text:
wrong number of arguments (2 for 1) [report/menu_field_changed]

Snippet from production.log:
[----] I, [2016-01-21T18:08:40.393387 #2767:429988]  INFO -- :   Parameters: {"node_id"=>"s__Configuration Management:Virtual Machines", "node_clicked"=>"1"}
[----] I, [2016-01-21T18:08:40.679494 #2767:429988]  INFO -- :   Rendered report/_menu_form2.html.haml (4.4ms)
[----] I, [2016-01-21T18:08:40.681869 #2767:429988]  INFO -- :   Rendered layouts/_x_edit_buttons.html.haml (1.6ms)
[----] I, [2016-01-21T18:08:40.807556 #2767:429988]  INFO -- : Completed 200 OK in 414ms (Views: 0.2ms | ActiveRecord: 34.0ms)
[----] I, [2016-01-21T18:08:49.722627 #2767:429988]  INFO -- : Started POST "/report/menu_field_changed?button=right" for 127.0.0.1 at 2016-01-21 18:08:49 -0500
[----] I, [2016-01-21T18:08:49.724177 #2767:429988]  INFO -- : Processing by ReportController#menu_field_changed as JS
[----] I, [2016-01-21T18:08:49.724266 #2767:429988]  INFO -- :   Parameters: {"selected_reports"=>["* VM Disk Usage"], "button"=>"right"}
[----] F, [2016-01-21T18:08:49.768248 #2767:429988] FATAL -- : Error caught: [ArgumentError] wrong number of arguments (2 for 1)
/opt/rh/cfme-gemset/gems/fast_gettext-1.0.0/lib/fast_gettext/translation.rb:20:in `_'
/opt/rh/cfme-gemset/gems/gettext_i18n_rails-1.3.2/lib/gettext_i18n_rails/html_safe_translations.rb:11:in `_'
/var/www/miq/vmdb/app/controllers/report_controller/menus.rb:466:in `block in move_menu_cols_right'
/var/www/miq/vmdb/app/controllers/report_controller/menus.rb:459:in `each'
/var/www/miq/vmdb/app/controllers/report_controller/menus.rb:459:in `move_menu_cols_right'
/var/www/miq/vmdb/app/controllers/report_controller/menus.rb:600:in `menu_get_form_vars'
/var/www/miq/vmdb/app/controllers/report_controller/menus.rb:59:in `menu_field_changed'
/opt/rh/cfme-gemset/gems/actionpack-4.2.5/lib/action_controller/metal/implicit_render.rb:4:in `send_action'
/opt/rh/cfme-gemset/gems/actionpack-4.2.5/lib/abstract_controller/base.rb:198:in `process_action'
/opt/rh/cfme-gemset/gems/actionpack-4.2.5/lib/action_controller/metal/rendering.rb:10:in `process_action'
/opt/rh/cfme-gemset/gems/actionpack-4.2.5/lib/abstract_controller/callbacks.rb:20:in `block in process_action'
/opt/rh/cfme-gemset/gems/activesupport-4.2.5/lib/active_support/callbacks.rb:117:in `call'
/opt/rh/cfme-gemset/gems/activesupport-4.2.5/lib/active_support/callbacks.rb:117:in `call'
/opt/rh/cfme-gemset/gems/activesupport-4.2.5/lib/active_support/callbacks.rb:555:in `block (2 levels) in compile'
/opt/rh/cfme-gemset/gems/activesupport-4.2.5/lib/active_support/callbacks.rb:505:in `call'
/opt/rh/cfme-gemset/gems/activesupport-4.2.5/lib/active_support/callbacks.rb:505:in `call'
/opt/rh/cfme-gemset/gems/activesupport-4.2.5/lib/active_support/callbacks.rb:92:in `__run_callbacks__'
/opt/rh/cfme-gemset/gems/activesupport-4.2.5/lib/active_support/callbacks.rb:778:in `_run_process_action_callbacks'
/opt/rh/cfme-gemset/gems/activesupport-4.2.5/lib/active_support/callbacks.rb:81:in `run_callbacks'
/opt/rh/cfme-gemset/gems/actionpack-4.2.5/lib/abstract_controller/callbacks.rb:19:in `process_action'
/opt/rh/cfme-gemset/gems/actionpack-4.2.5/lib/action_controller/metal/rescue.rb:29:in `process_action'
/opt/rh/cfme-gemset/gems/actionpack-4.2.5/lib/action_controller/metal/instrumentation.rb:32:in `block in process_action'
/opt/rh/cfme-gemset/gems/activesupport-4.2.5/lib/active_support/notifications.rb:164:in `block in instrument'
/opt/rh/cfme-gemset/gems/activesupport-4.2.5/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/opt/rh/cfme-gemset/gems/activesupport-4.2.5/lib/active_support/notifications.rb:164:in `instrument'
/opt/rh/cfme-gemset/gems/actionpack-4.2.5/lib/action_controller/metal/instrumentation.rb:30:in `process_action'
/opt/rh/cfme-gemset/gems/actionpack-4.2.5/lib/action_controller/metal/params_wrapper.rb:250:in `process_action'
/opt/rh/cfme-gemset/gems/activerecord-4.2.5/lib/active_record/railties/controller_runtime.rb:18:in `process_action'
/opt/rh/cfme-gemset/gems/actionpack-4.2.5/lib/abstract_controller/base.rb:137:in `process'
/opt/rh/cfme-gemset/gems/actionview-4.2.5/lib/action_view/rendering.rb:30:in `process'
/opt/rh/cfme-gemset/gems/actionpack-4.2.5/lib/action_controller/metal.rb:196:in `dispatch'
/opt/rh/cfme-gemset/gems/actionpack-4.2.5/lib/action_controller/metal/rack_delegation.rb:13:in `dispatch'
/opt/rh/cfme-gemset/gems/actionpack-4.2.5/lib/action_controller/metal.rb:237:in `block in action'
/opt/rh/cfme-gemset/gems/actionpack-4.2.5/lib/action_dispatch/routing/route_set.rb:76:in `call'
/opt/rh/cfme-gemset/gems/actionpack-4.2.5/lib/action_dispatch/routing/route_set.rb:76:in `dispatch'
/opt/rh/cfme-gemset/gems/actionpack-4.2.5/lib/action_dispatch/routing/route_set.rb:45:in `serve'
/opt/rh/cfme-gemset/gems/actionpack-4.2.5/lib/action_dispatch/journey/router.rb:43:in `block in serve'
/opt/rh/cfme-gemset/gems/actionpack-4.2.5/lib/action_dispatch/journey/router.rb:30:in `each'
/opt/rh/cfme-gemset/gems/actionpack-4.2.5/lib/action_dispatch/journey/router.rb:30:in `serve'
/opt/rh/cfme-gemset/gems/actionpack-4.2.5/lib/action_dispatch/routing/route_set.rb:817:in `call'
/opt/rh/cfme-gemset/gems/rack-1.6.4/lib/rack/etag.rb:24:in `call'
/opt/rh/cfme-gemset/gems/rack-1.6.4/lib/rack/conditionalget.rb:38:in `call'


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


How reproducible:
----------------
Always


Steps to Reproduce:
------------------
1.Create a child tenant under 'My Company'.
2.Create a tenant admin user under this tenant
3.Log in as this user and navigate to Cloud Intelligence->Reports.
4.Click 'Edit Report Menus' accordion.Click the group to which the user belongs.
Double click any sub folder to manage reports. For eg: Double click Virtual Machines under Configuration Management.
5.Try to remove a report by moving it to the right.


Actual results:
---------------
UI error


Expected results:
-----------------
No UI errors.I also believe this operation should not be allowed in the first place.There is a message on the UI that reads 'Report is not owned by your group so it cannot be removed',but this operation is still allowed.


Additional info:
---------------

Comment 2 Shveta 2016-01-27 19:43:12 UTC
Assigning to add test case

Comment 3 Brett Thurber 2016-02-01 07:11:39 UTC
I see this same error as admin.  Unable to create a newm Report Menu item and unable to add a report to an existing menu item for any role.

Comment 4 Milan Zázrivec 2016-02-08 14:31:43 UTC
https://github.com/ManageIQ/manageiq/pull/6549

Comment 5 CFME Bot 2016-02-08 16:02:02 UTC
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/ba62027241b1f3aac30060edcfca406f89036ed8

commit ba62027241b1f3aac30060edcfca406f89036ed8
Author:     Milan Zazrivec <mzazrivec>
AuthorDate: Mon Feb 8 15:30:18 2016 +0100
Commit:     Milan Zazrivec <mzazrivec>
CommitDate: Mon Feb 8 15:40:28 2016 +0100

    Fix incorrect gettext invocations
    
    _() takes one argument only: string.
    
    Introduced in 80fbeeceecf0701ebebdabc6acd484df86af64ea
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1300861

 app/controllers/application_controller/performance.rb | 2 +-
 app/controllers/report_controller/menus.rb            | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

Comment 7 CFME Bot 2016-02-15 15:42:10 UTC
Detected commit referencing this ticket while ticket status is MODIFIED.

Comment 8 Nandini Chandra 2016-04-29 03:59:21 UTC
Verified in 5.4.0.6

Comment 10 errata-xmlrpc 2016-06-29 15:32:26 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2016:1348