From: Julien Lancelot Date: Fri, 31 May 2013 13:38:19 +0000 (+0200) Subject: SONAR-3755 Fix issue when no root component on issues search page X-Git-Tag: 3.6~148 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=cf4cd0be6932685c9c0025e8755c107cf421124c;p=sonarqube.git SONAR-3755 Fix issue when no root component on issues search page --- diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/issues/_sidebar.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/issues/_sidebar.html.erb index b726f192374..53bd96295b4 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/issues/_sidebar.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/issues/_sidebar.html.erb @@ -9,7 +9,7 @@
  • <%= message 'issue_filter.criteria.project' -%>: - <% selected_componentRoot = Internal.component_api.findByKey(@filter.criteria('componentRoots')) %> + <% selected_componentRoot = Internal.component_api.findByKey(@filter.criteria('componentRoots')) if @filter.criteria('componentRoots') %> <%= component_select_tag 'componentRoots', :resource_type_property => 'supportsGlobalDashboards', :width => '100%', :selected_resource => selected_componentRoot, :display_key => true, @@ -38,13 +38,13 @@
  • <%= message 'issue_filter.criteria.assignee' -%>: - <% selected_assignee = Api.users.findByLogin(@filter.criteria('assignees')) %> + <% selected_assignee = Api.users.findByLogin(@filter.criteria('assignees')) if @filter.criteria('assignees') %> <%= user_select_tag('assignees', {:selected_user => selected_assignee, :width => '100%', :placeholder => message('issue_filter.criteria.assignee'), :html_id => 'select-assignee', :open => false, :allow_clear => true}) -%>
  • <%= message 'issue_filter.criteria.reporter' -%>: - <% selected_reporter = Api.users.findByLogin(@filter.criteria('reporters')) %> + <% selected_reporter = Api.users.findByLogin(@filter.criteria('reporters')) if @filter.criteria('reporters') %> <%= user_select_tag('reporters', {:selected_user => selected_reporter, :width => '100%', :placeholder => message('issue_filter.criteria.reporter'), :html_id => 'select-reporter', :open => false, :allow_clear => true}) -%>