From: Sébastien Lesaint Date: Fri, 17 Jun 2016 15:30:29 +0000 (+0200) Subject: SONAR-7693 fix use of SNAPSHOTS.PROJECT_ID in events widget X-Git-Tag: 6.0-RC1~279 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=945b42ecb72f287751bd031a2fb2b1bc8ab2c876;p=sonarqube.git SONAR-7693 fix use of SNAPSHOTS.PROJECT_ID in events widget --- 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 }