summaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorJulien Lancelot <julien.lancelot@sonarsource.com>2014-01-20 15:32:18 +0100
committerJulien Lancelot <julien.lancelot@sonarsource.com>2014-01-20 15:32:18 +0100
commit22e1b16c81ddff3088d75da625b9d9469115934c (patch)
treed27bb92102f7b31385a22162a81a466cc112f889 /plugins
parent877cdd56155379608dd79b08008b57f946cd6cdf (diff)
downloadsonarqube-22e1b16c81ddff3088d75da625b9d9469115934c.tar.gz
sonarqube-22e1b16c81ddff3088d75da625b9d9469115934c.zip
Update all links (issues widget, action plan page and email notification) to /issues/search
Diffstat (limited to 'plugins')
-rw-r--r--plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/issue/notification/NewIssuesEmailTemplate.java2
-rw-r--r--plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/issues/action_plans.html.erb3
-rw-r--r--plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/issues/unresolved_issues_per_assignee.html.erb6
-rw-r--r--plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/issues/unresolved_issues_statuses.html.erb8
-rw-r--r--plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/issue/notification/NewIssuesEmailTemplateTest.java2
5 files changed, 9 insertions, 12 deletions
diff --git a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/issue/notification/NewIssuesEmailTemplate.java b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/issue/notification/NewIssuesEmailTemplate.java
index f0c425ab955..a896823ac0c 100644
--- a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/issue/notification/NewIssuesEmailTemplate.java
+++ b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/issue/notification/NewIssuesEmailTemplate.java
@@ -89,7 +89,7 @@ public class NewIssuesEmailTemplate extends EmailTemplate {
String dateString = notification.getFieldValue(FIELD_PROJECT_DATE);
if (projectKey != null && dateString != null) {
Date date = DateUtils.parseDateTime(dateString);
- String url = String.format("%s/issues/search?componentRoots=%s&createdAt=%s",
+ String url = String.format("%s/issues/search#componentRoots=%s|createdAt=%s",
settings.getServerBaseURL(), encode(projectKey), encode(DateUtils.formatDateTime(date)));
sb.append("\n").append("See it in SonarQube: ").append(url).append("\n");
}
diff --git a/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/issues/action_plans.html.erb b/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/issues/action_plans.html.erb
index 049808fddfc..8e1a42e73a0 100644
--- a/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/issues/action_plans.html.erb
+++ b/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/issues/action_plans.html.erb
@@ -66,8 +66,7 @@
<% if unresolved_issues_size == 0 %>
<%= unresolved_issues_size -%>
<% else %>
- <a href="<%= url_for({:controller => 'issues', :action => 'search',
- :actionPlans => plan.key, :resolved => 'false'}) -%>"
+ <a href="<%= url_for_issues({:actionPlans => plan.key, :resolved => 'false'}) -%>"
title="<%= message('widget.action_plans.x_unresolved_issues', :params => unresolved_issues_size.to_s) -%>"><%= unresolved_issues_size -%></a>
<% end %>
</td>
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 08ba140c521..5e1cadae3d9 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
@@ -53,8 +53,7 @@
%>
<tr class="<%= cycle 'even', 'odd', :name => (div_id) -%>">
<td class="max-width">
- <%= link_to results.user(assignee).name,
- {:controller => 'issues', :action => 'search', :assignees => assignee}.merge(options) -%>
+ <%= link_to results.user(assignee).name, url_for_issues(options.merge(:assignees => assignee)) -%>
</td>
<td class="nowrap">
<%= '+' if @dashboard_configuration.selected_period? -%><%= count.to_s -%>
@@ -72,8 +71,7 @@
%>
<tr class="<%= cycle 'even', 'odd', :name => (div_id) -%>">
<td class="max-width">
- <%= link_to message('widget.reviews_per_developer.not_assigned'),
- {:controller => 'issues', :action => 'search', :assigned => 'false'}.merge(options) -%>
+ <%= link_to message('widget.reviews_per_developer.not_assigned'), url_for_issues(options.merge(:assigned => 'false')) -%>
</td>
<td class="nowrap">
<%= '+' if @dashboard_configuration.selected_period? -%><%= counter_no_assignee.to_s -%>
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 255ea178eb4..7b54a12bcb9 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
@@ -15,7 +15,7 @@
<h3><%= message('issues') -%></h3>
<div class="marginbottom10">
<span class="big">
- <%= format_measure(issues, :url => url_for({:controller => 'issues', :action => 'search' }.merge(issues_search_options))) -%>
+ <%= format_measure(issues, :url => url_for_issues(issues_search_options)) -%>
</span>
<%= dashboard_configuration.selected_period? ? format_variation(issues) : trend_icon(issues) -%>
</div>
@@ -26,7 +26,7 @@
<h3><%= message('issue.status.OPEN') -%></h3>
<div class="marginbottom10">
<span class="big">
- <%= format_measure(open_issues, :url => url_for({:controller => 'issues', :action => 'search', :statuses => 'OPEN'}.merge(issues_search_options))) -%>
+ <%= format_measure(open_issues, :url => url_for_issues(issues_search_options.merge(:statuses => 'OPEN'))) -%>
</span>
<%= dashboard_configuration.selected_period? ? format_variation(open_issues) : trend_icon(open_issues) -%>
</div>
@@ -37,7 +37,7 @@
<h3><%= message('issue.status.REOPENED') -%></h3>
<div class="marginbottom10">
<span class="big">
- <%= format_measure(reopened_issues, :url => url_for({:controller => 'issues', :action => 'search', :statuses => 'REOPENED'}.merge(issues_search_options))) -%>
+ <%= format_measure(reopened_issues, :url => url_for_issues(issues_search_options.merge(:statuses => 'REOPENED'))) -%>
</span>
<%= dashboard_configuration.selected_period? ? format_variation(reopened_issues) : trend_icon(reopened_issues) -%>
</div>
@@ -48,7 +48,7 @@
<h3><%= message('issue.status.CONFIRMED') -%></h3>
<div class="marginbottom10">
<span class="big">
- <%= format_measure(confirmed_issues, :url => url_for({:controller => 'issues', :action => 'search', :statuses => 'CONFIRMED'}.merge(issues_search_options))) -%>
+ <%= format_measure(confirmed_issues, :url => url_for_issues(issues_search_options.merge(:statuses => 'CONFIRMED'))) -%>
</span>
<%= dashboard_configuration.selected_period? ? format_variation(confirmed_issues) : trend_icon(confirmed_issues) -%>
</div>
diff --git a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/issue/notification/NewIssuesEmailTemplateTest.java b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/issue/notification/NewIssuesEmailTemplateTest.java
index 35d0468f1ef..aa6e4980309 100644
--- a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/issue/notification/NewIssuesEmailTemplateTest.java
+++ b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/issue/notification/NewIssuesEmailTemplateTest.java
@@ -108,7 +108,7 @@ public class NewIssuesEmailTemplateTest {
"\n" +
" Blocker: 0 Critical: 5 Major: 10 Minor: 3 Info: 1\n" +
"\n" +
- "See it in SonarQube: http://nemo.sonarsource.org/issues/search?componentRoots=org.apache%3Astruts&createdAt=2010-05-18T14%3A50%3A45%2B0000\n");
+ "See it in SonarQube: http://nemo.sonarsource.org/issues/search#componentRoots=org.apache%3Astruts|createdAt=2010-05-18T14%3A50%3A45%2B0000\n");
}
@Test