From 48563f868573a21cac93c8143b36b26200f19a6c Mon Sep 17 00:00:00 2001 From: Fabrice Bellingard Date: Wed, 26 Oct 2011 11:00:45 +0200 Subject: SONAR-2919 Fix issues on the event handling - Make it impossible to create event without a category -> created "Other" category -> updated both UI and WS (actually: constraint on Event class) - Fix display issue on Chrome - Make it impossible to remove version from last snapshot - Show event widget on sub-projects - Update purge mechanism to delete events that are not attached to a snapshot or attached to an unexisting snapshot --- .../org/sonar/plugins/core/widgets/events.html.erb | 2 +- .../plugins/dbcleaner/purges/PurgeEventOrphans.java | 14 ++++++++++++-- .../purgeEventOrphans-result.xml | 21 ++++++++++++++++----- .../PurgeEventOrphansTest/purgeEventOrphans.xml | 15 +++++++++++++-- .../main/resources/org/sonar/l10n/core.properties | 1 + .../WEB-INF/app/controllers/project_controller.rb | 14 ++++++++------ .../src/main/webapp/WEB-INF/app/models/event.rb | 3 ++- .../webapp/WEB-INF/app/models/event_category.rb | 12 +++++++++--- .../WEB-INF/app/views/project/_edit_event.html.erb | 2 +- .../WEB-INF/app/views/project/events.html.erb | 3 ++- .../WEB-INF/app/views/project/history.html.erb | 2 +- 11 files changed, 66 insertions(+), 23 deletions(-) diff --git a/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/events.html.erb b/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/events.html.erb index 1a2755b5af5..c9fb693c91f 100644 --- a/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/events.html.erb +++ b/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/events.html.erb @@ -1,4 +1,4 @@ -<% if @project.project? %> +<% if @project.scope=='PRJ' %>