From b2777a9567ffc7cf293914e7fc1a3f7745adfd0a Mon Sep 17 00:00:00 2001 From: Stas Vilchik Date: Fri, 6 Feb 2015 10:38:01 +0100 Subject: [PATCH] SONAR-6026 apply feedback --- .../core/widgets/issues/false_positive_issues.html.erb | 1 + .../core/widgets/issues/my_unresolved_issues.html.erb | 3 +++ .../issues/unresolved_issues_per_assignee.html.erb | 1 + .../widgets/issues/unresolved_issues_statuses.html.erb | 1 + .../main/webapp/WEB-INF/app/helpers/application_helper.rb | 8 +++++--- 5 files changed, 11 insertions(+), 3 deletions(-) diff --git a/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/issues/false_positive_issues.html.erb b/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/issues/false_positive_issues.html.erb index a965e7dd336..bd32fb74fb9 100644 --- a/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/issues/false_positive_issues.html.erb +++ b/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/issues/false_positive_issues.html.erb @@ -2,6 +2,7 @@ if has_role?(:user, @project) search_options = {} + search_options['componentUuids'] = @project.uuid search_options['resolutions'] = 'FALSE-POSITIVE' title = message('widget.false_positive_reviews.name') %> diff --git a/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/issues/my_unresolved_issues.html.erb b/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/issues/my_unresolved_issues.html.erb index 769ec03a3bc..c73cefa4d44 100644 --- a/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/issues/my_unresolved_issues.html.erb +++ b/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/issues/my_unresolved_issues.html.erb @@ -2,6 +2,9 @@ if current_user && (!@project || has_role?(:user, @project)) search_options = {} + if @project + search_options['componentUuids'] = @project.uuid + end search_options['resolved'] = 'false' search_options['assignees'] = current_user.login diff --git a/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/issues/unresolved_issues_per_assignee.html.erb b/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/issues/unresolved_issues_per_assignee.html.erb index 165cb6727c5..e5f0b6ff0b5 100644 --- a/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/issues/unresolved_issues_per_assignee.html.erb +++ b/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/issues/unresolved_issues_per_assignee.html.erb @@ -1,6 +1,7 @@ <% options = {} options['resolved'] = 'false' + 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) diff --git a/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/issues/unresolved_issues_statuses.html.erb b/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/issues/unresolved_issues_statuses.html.erb index cc81f5cba0c..782472f4575 100644 --- a/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/issues/unresolved_issues_statuses.html.erb +++ b/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/issues/unresolved_issues_statuses.html.erb @@ -6,6 +6,7 @@ issues_search_options = {} issues_search_options['resolved'] = 'false' + issues_search_options['componentUuids'] = @project.uuid %> diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/helpers/application_helper.rb b/server/sonar-web/src/main/webapp/WEB-INF/app/helpers/application_helper.rb index 506bbf24bdc..3ec5c860636 100644 --- a/server/sonar-web/src/main/webapp/WEB-INF/app/helpers/application_helper.rb +++ b/server/sonar-web/src/main/webapp/WEB-INF/app/helpers/application_helper.rb @@ -1052,9 +1052,11 @@ module ApplicationHelper else url = ApplicationController.root_context + '/component_issues/index?id=' + url_encode(component.key) + '#' params.each_with_index do |(key, value), index| - url += key.to_s + '=' + value.to_s - if index < params.size - 1 - url += '|' + if key != 'componentUuids' + url += key.to_s + '=' + value.to_s + if index < params.size - 1 + url += '|' + end end end url -- 2.39.5