]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-5893 Fix initial feedback on tag cloud widget
authorJean-Baptiste Lievremont <jean-baptiste.lievremont@sonarsource.com>
Fri, 9 Jan 2015 09:50:41 +0000 (10:50 +0100)
committerJean-Baptiste Lievremont <jean-baptiste.lievremont@sonarsource.com>
Fri, 9 Jan 2015 09:58:23 +0000 (10:58 +0100)
plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/issues/issue_tag_cloud.html.erb
server/sonar-server/src/main/java/org/sonar/server/issue/index/IssueIndex.java
server/sonar-server/src/test/java/org/sonar/server/issue/IssueServiceMediumTest.java
server/sonar-web/src/main/coffee/widgets/tag-cloud.coffee

index 871b6b69db487cf6f48f976ef9582b3222c35a34..066444ca76938b4432a39be2d9acddb130920cd6 100644 (file)
 
 <div class="histogram-widget" id="<%= containerId %>">
   <!--[if lte IE 8 ]> <h3><%= message('widget.unsupported_browser_warning') -%></h3> <![endif]-->
+
+  <!--[if (gte IE 9)|!(IE)]><!-->
+  <h3 style="margin-bottom: 5px;"><%= title -%></h3>
+  <!--<![endif]-->
+
 </div>
 
 <!--[if (gte IE 9)|!(IE)]><!-->
@@ -30,7 +35,7 @@
       .source(baseUrl + '/api/issues/component_tags?' + query)
       .options({
         maxItemsReachedMessage: '<%= message("widget.measure_filter_histogram.max_items_reached", :params => [maxItems]) -%>',
-        baseUrl: baseUrl + '/issues/search/#componentUuids=<%= @project.uuid() -%>',
+        baseUrl: baseUrl + '/issues/search#resolved=false|componentUuids=<%= @project.uuid() -%>',
         noData: '<%= message('no_data') -%>'
       })
       .render('#<%= containerId -%>');
index c443c82115833bfdab9c5b39d27f778cc386af91..9d055d022edc5e52c588b3d2b313e63e7b469405 100644 (file)
@@ -518,6 +518,7 @@ public class IssueIndex extends BaseIndex<Issue, FakeIssueDto, String> {
       .setQuery(QueryBuilders.filteredQuery(QueryBuilders.matchAllQuery(),
         FilterBuilders.boolFilter()
           .must(getAuthorizationFilter(new QueryContext()))
+          .must(FilterBuilders.missingFilter(IssueIndexDefinition.FIELD_ISSUE_RESOLUTION))
           .must(componentFilter(Arrays.asList(componentUuid)))));
     TermsBuilder aggreg = AggregationBuilders.terms("_ref")
       .field(IssueIndexDefinition.FIELD_ISSUE_TAGS)
index eccf43c8f4a5ba6ff5703f7aa434506d7e9e7229..b1733955afc1906383998c3293c68dbcd1709b36 100644 (file)
@@ -496,7 +496,9 @@ public class IssueServiceMediumTest {
       IssueTesting.newDto(rule, file, project).setTags(ImmutableSet.of("convention", "java8", "bug")),
       IssueTesting.newDto(rule, file, project).setTags(ImmutableSet.of("convention", "bug")),
       IssueTesting.newDto(rule, file, project),
+      IssueTesting.newDto(rule, file, project).setTags(ImmutableSet.of("convention", "java8", "bug")).setResolution(Issue.RESOLUTION_FIXED),
       IssueTesting.newDto(rule, file, project).setTags(ImmutableSet.of("convention")));
+
     session.commit();
     index();
 
index c776443dacb69cd23d6868adf4de4859fe208fe5..bb9965cd88c949c879fd0fb5807feece8abbd2f5 100644 (file)
@@ -47,6 +47,10 @@ class TagCloud extends window.SonarWidgets.BaseWidget
     super
 
 
+  tooltip: (d) ->
+    "#{d.key} (#{d.value})"
+
+
   parseSource: (response) ->
     @tags(response.tags)