]> source.dussan.org Git - sonarqube.git/commitdiff
The projects that can be selected in the issues sidebar should only be TRK projects
authorJulien Lancelot <julien.lancelot@gmail.com>
Wed, 10 Jul 2013 09:36:42 +0000 (11:36 +0200)
committerJulien Lancelot <julien.lancelot@gmail.com>
Wed, 10 Jul 2013 09:36:42 +0000 (11:36 +0200)
sonar-server/src/main/webapp/WEB-INF/app/views/issues/_bulk_change_form.html.erb
sonar-server/src/main/webapp/WEB-INF/app/views/issues/_sidebar.html.erb

index 747f8c4464e9f1612e5e6b0db37caefa1d7dad86..646d692c1aabf231510ab3c54321da49cab9116f 100644 (file)
@@ -3,10 +3,7 @@
 
    issues = issues_result.issues
    max_page_size_reached = issues_result.issues.size >= issues_result.paging.pageSize()
-   project_key = nil
-   if issues_result.projects().to_a.size == 1
-     project_key = issues_result.project(issues.to_a.first).key unless issues.empty?
-   end
+   project_key = issues_result.project(issues.to_a.first).key if !issues.empty? && issues_result.projects().to_a.size == 1
 
    transitions_by_issues = {}
    unresolved_issues = 0
index c400c02e72ec442b0a0dee379314cdc2f3ab3071..bb7714d86f4de8479456104315ec83686846ec37 100644 (file)
     <li id="criteria-project" class="marginbottom5">
       <%= message 'issue_filter.criteria.project' -%>:
       <% selected_componentRoot = Internal.component_api.findByKey(@issues_query.componentRoots.to_a.first) if @issues_query.componentRoots and @issues_query.componentRoots.size == 1 %>
-      <%= component_select_tag 'componentRoots', :resource_type_property => 'supportsGlobalDashboards', :width => '100%',
-                              :selected_resource => selected_componentRoot,
-                              :display_key => true,
-                              :placeholder => message('issue_filter.criteria.project'),
-                              :html_id => 'select-project',
-                              :allow_clear => true
+      <%= component_select_tag 'componentRoots',
+                               :width => '100%',
+                               :resource_type_property => 'supportsGlobalDashboards',
+                               :qualifiers => ['TRK'],
+                               :selected_resource => selected_componentRoot,
+                               :display_key => true,
+                               :placeholder => message('issue_filter.criteria.project'),
+                               :html_id => 'select-project',
+                               :allow_clear => true
       -%>
     </li>
     <li id="criteria-severity" class="marginbottom5">