]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-7693 fix use of SNAPSHOTS.PROJECT_ID in events widget
authorSébastien Lesaint <sebastien.lesaint@sonarsource.com>
Fri, 17 Jun 2016 15:30:29 +0000 (17:30 +0200)
committerSébastien Lesaint <sebastien.lesaint@sonarsource.com>
Mon, 20 Jun 2016 07:41:40 +0000 (09:41 +0200)
server/sonar-server/src/main/resources/org/sonar/server/dashboard/widget/events.html.erb

index 7e34636d15033c5ca4d8149100990856c0ab2d7c..b47cf879ea6bc100bc9ac93b338e7e2d7f3fa251 100644 (file)
@@ -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 }