From: Jean-Baptiste Lievremont Date: Fri, 9 Jan 2015 09:50:41 +0000 (+0100) Subject: SONAR-5893 Fix initial feedback on tag cloud widget X-Git-Tag: latest-silver-master-#65~271 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=010e7e498dd6b586249bb24613757aeda5d0152e;p=sonarqube.git SONAR-5893 Fix initial feedback on tag cloud widget --- diff --git a/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/issues/issue_tag_cloud.html.erb b/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/issues/issue_tag_cloud.html.erb index 871b6b69db4..066444ca769 100644 --- a/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/issues/issue_tag_cloud.html.erb +++ b/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/issues/issue_tag_cloud.html.erb @@ -14,6 +14,11 @@
+ + +

<%= title -%>

+ +
@@ -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 -%>'); diff --git a/server/sonar-server/src/main/java/org/sonar/server/issue/index/IssueIndex.java b/server/sonar-server/src/main/java/org/sonar/server/issue/index/IssueIndex.java index c443c821158..9d055d022ed 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/issue/index/IssueIndex.java +++ b/server/sonar-server/src/main/java/org/sonar/server/issue/index/IssueIndex.java @@ -518,6 +518,7 @@ public class IssueIndex extends BaseIndex { .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) diff --git a/server/sonar-server/src/test/java/org/sonar/server/issue/IssueServiceMediumTest.java b/server/sonar-server/src/test/java/org/sonar/server/issue/IssueServiceMediumTest.java index eccf43c8f4a..b1733955afc 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/issue/IssueServiceMediumTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/issue/IssueServiceMediumTest.java @@ -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(); diff --git a/server/sonar-web/src/main/coffee/widgets/tag-cloud.coffee b/server/sonar-web/src/main/coffee/widgets/tag-cloud.coffee index c776443dacb..bb9965cd88c 100644 --- a/server/sonar-web/src/main/coffee/widgets/tag-cloud.coffee +++ b/server/sonar-web/src/main/coffee/widgets/tag-cloud.coffee @@ -47,6 +47,10 @@ class TagCloud extends window.SonarWidgets.BaseWidget super + tooltip: (d) -> + "#{d.key} (#{d.value})" + + parseSource: (response) -> @tags(response.tags)