From 945b42ecb72f287751bd031a2fb2b1bc8ab2c876 Mon Sep 17 00:00:00 2001 From: =?utf8?q?S=C3=A9bastien=20Lesaint?= Date: Fri, 17 Jun 2016 17:30:29 +0200 Subject: [PATCH] SONAR-7693 fix use of SNAPSHOTS.PROJECT_ID in events widget --- .../resources/org/sonar/server/dashboard/widget/events.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/sonar-server/src/main/resources/org/sonar/server/dashboard/widget/events.html.erb b/server/sonar-server/src/main/resources/org/sonar/server/dashboard/widget/events.html.erb index 7e34636d150..b47cf879ea6 100644 --- a/server/sonar-server/src/main/resources/org/sonar/server/dashboard/widget/events.html.erb +++ b/server/sonar-server/src/main/resources/org/sonar/server/dashboard/widget/events.html.erb @@ -4,7 +4,7 @@ conditions = "component_uuid=:component_uuid" values = {:component_uuid => @resource.uuid} # in order to not display events linked to deleted snapshot, we build the SQL request with 'NOT IN' as most of the time, there won't be unprocessed snapshots - snapshots_to_be_deleted = Snapshot.find(:all, :conditions => ["status='U' AND project_id=?", @resource.id]) + snapshots_to_be_deleted = Snapshot.find(:all, :conditions => ["status='U' AND component_uuid=?", @resource.uuid]) unless snapshots_to_be_deleted.empty? conditions << " AND snapshot_id NOT IN (:sids)" values[:sids] = snapshots_to_be_deleted.map { |s| s.id } -- 2.39.5