From 05090c806b7aa350b0aa4fc31418859d5cd6b78e Mon Sep 17 00:00:00 2001 From: Fabrice Bellingard Date: Wed, 7 Dec 2011 17:39:49 +0100 Subject: [PATCH] SONAR-2399 Make the differential mode work on Derby and "More" links --- .../core/widgets/reviews/false_positive_reviews.html.erb | 7 ++++++- .../plugins/core/widgets/reviews/my_reviews.html.erb | 7 ++++++- .../plugins/core/widgets/reviews/project_reviews.html.erb | 8 +++++++- .../webapp/WEB-INF/app/controllers/reviews_controller.rb | 4 ++-- 4 files changed, 21 insertions(+), 5 deletions(-) diff --git a/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/reviews/false_positive_reviews.html.erb b/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/reviews/false_positive_reviews.html.erb index e0429e02b3a..6dcd5a29f2a 100644 --- a/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/reviews/false_positive_reviews.html.erb +++ b/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/reviews/false_positive_reviews.html.erb @@ -1,12 +1,17 @@ <% if has_role?(:user, @project) limit = widget_properties["numberOfLines"].to_i == 0 ? 5 : widget_properties["numberOfLines"].to_i + + if @dashboard_configuration.selected_period? + from_date = @dashboard_configuration.from_datetime + to_date = @snapshot.created_at + end %>
+ :assignee_login => '', :statuses => [''], :from => from_date, :to => to_date -%>"> <%= message('widgets.more') -%>
diff --git a/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/reviews/my_reviews.html.erb b/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/reviews/my_reviews.html.erb index 52fe8206a86..9e51c9ab19e 100644 --- a/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/reviews/my_reviews.html.erb +++ b/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/reviews/my_reviews.html.erb @@ -1,11 +1,16 @@ <% if current_user && has_role?(:user, @project) limit = widget_properties["numberOfLines"].to_i == 0 ? 5 : widget_properties["numberOfLines"].to_i + + if @dashboard_configuration.selected_period? + from_date = @dashboard_configuration.from_datetime + to_date = @snapshot.created_at + end %>
- + <%= message('widgets.more') -%>
diff --git a/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/reviews/project_reviews.html.erb b/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/reviews/project_reviews.html.erb index a82e6bb5e05..0f4017e1615 100644 --- a/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/reviews/project_reviews.html.erb +++ b/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/reviews/project_reviews.html.erb @@ -1,11 +1,17 @@ <% if has_role?(:user, @project) limit = widget_properties["numberOfLines"].to_i == 0 ? 5 : widget_properties["numberOfLines"].to_i + + if @dashboard_configuration.selected_period? + from_date = @dashboard_configuration.from_datetime + to_date = @snapshot.created_at + end %>
- + <%= message('widgets.more') -%>
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/reviews_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/reviews_controller.rb index 9c949552290..8631455ae96 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/reviews_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/reviews_controller.rb @@ -330,8 +330,8 @@ class ReviewsController < ApplicationController @id = params[:review_id] || '' @sort = params[:sort] @asc = params[:asc] == "true" - @from = params[:from] - @to = params[:to] + @from = Time.parse(params[:from]) if params[:from] + @to = Time.parse(params[:to]) if params[:to] end def filter_any(array) -- 2.39.5