]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-6026 Migrate issue related widgets to new search parameter
authorJean-Baptiste Lievremont <jean-baptiste.lievremont@sonarsource.com>
Tue, 6 Jan 2015 15:43:11 +0000 (16:43 +0100)
committerJean-Baptiste Lievremont <jean-baptiste.lievremont@sonarsource.com>
Wed, 7 Jan 2015 10:37:12 +0000 (11:37 +0100)
plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/issues/action_plans.html.erb
plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/issues/false_positive_issues.html.erb
plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/issues/my_unresolved_issues.html.erb
plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/issues/unresolved_issues_per_assignee.html.erb
plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/issues/unresolved_issues_statuses.html.erb

index 18fe4e3c186e946129dec504fb77d44db02bb42f..cde608476743f2f646b2cf33c98a3e9dc6d8e86b 100644 (file)
                    search_options = {}
                    search_options['actionPlans'] = plan.key
                    search_options['resolved'] = false
-                   if @project.qualifier == 'TRK'
-                     search_options['projectUuids'] = @project.uuid
-                   else
-                     search_options['componentRootUuids'] = @project.uuid
-                   end
+                   search_options['componentUuids'] = @project.uuid
                 %>
               <a href="<%= url_for_issues(search_options) -%>"
                  title="<%= message('widget.action_plans.x_unresolved_issues', :params => unresolved_issues_size.to_s) -%>"><%= unresolved_issues_size -%></a>
index 0a33fb66901d8ce9d2620e087854f5b112e2f563..bd32fb74fb95eef7ba2e987098cc423b1ae90005 100644 (file)
@@ -2,11 +2,7 @@
    if has_role?(:user, @project)
 
      search_options = {}
-     if @project.qualifier == 'TRK'
-       search_options['projectUuids'] = @project.uuid
-     else
-       search_options['componentRootUuids'] = @project.uuid
-     end
+     search_options['componentUuids'] = @project.uuid
      search_options['resolutions'] = 'FALSE-POSITIVE'
      title = message('widget.false_positive_reviews.name')
 %>
index 6ff8884370cc53eb60758db4641a840b5095ba4b..c73cefa4d449279cfc276778b593cb26a73344e6 100644 (file)
@@ -3,20 +3,16 @@
 
      search_options = {}
      if @project
-       if @project.qualifier == 'TRK'
-         search_options['projectUuids'] = @project.uuid
-       else
-         search_options['componentRootUuids'] = @project.uuid
-       end
+       search_options['componentUuids'] = @project.uuid
      end
      search_options['resolved'] = 'false'
      search_options['assignees'] = current_user.login
-     
+
      title = message('widget.my_reviews.name')
 %>
 
   <%= render :partial => 'project/widgets/issues/issues_list_widget',
-             :locals => {:search_options => search_options, :title => title, 
+             :locals => {:search_options => search_options, :title => title,
                          :widget_id => widget.id.to_s, :widget_properties => widget_properties} %>
 
 <% end %>
index bfae944e33713ec3a076b13c00118f0e6d50c1c7..99252fe3281f5ecfdffa25df60ee5fea3edde06a 100644 (file)
@@ -1,11 +1,7 @@
 <%
     options = {}
     options['resolved'] = 'false'
-    if @project.qualifier == 'TRK'
-      options['projectUuids'] = @project.uuid
-    else
-      options['componentRootUuids'] = @project.uuid
-    end
+    options['componentUuids'] = @project.uuid
     if @dashboard_configuration.selected_period?
       options['createdAfter'] = Api::Utils.format_datetime(@dashboard_configuration.from_datetime)
       options['createdBefore'] = Api::Utils.format_datetime(DateTime.now)
index f620dcbe4e9b966e45e1d0e6765dbea09071a392..17caca037a2b1070441994a4c300810ea91c7614 100644 (file)
@@ -6,11 +6,7 @@
 
    issues_search_options = {}
    issues_search_options['resolved'] = 'false'
-   if @project.qualifier == 'TRK'
-    issues_search_options['projectUuids'] = @project.uuid
-   else
-     issues_search_options['componentRootUuids'] = @project.uuid
-   end
+   issues_search_options['componentUuids'] = @project.uuid
 %>
 <table width="100%">
   <tr>