diff options
author | Fabrice Bellingard <bellingard@gmail.com> | 2012-03-14 12:01:11 +0100 |
---|---|---|
committer | Fabrice Bellingard <bellingard@gmail.com> | 2012-03-14 12:02:04 +0100 |
commit | a4cd43b090912073a0219a50d3405e6290c99835 (patch) | |
tree | 47accb347af346a43dff6587993c3c966ad80bb3 /sonar-server | |
parent | 74de2d082e395c75e1c9fb3fc51f2870bb181ed8 (diff) | |
download | sonarqube-a4cd43b090912073a0219a50d3405e6290c99835.tar.gz sonarqube-a4cd43b090912073a0219a50d3405e6290c99835.zip |
SONAR-3326 Problem displaying History when project has a Green Alert
Diffstat (limited to 'sonar-server')
-rw-r--r-- | sonar-server/src/main/webapp/WEB-INF/app/models/event.rb | 6 | ||||
-rw-r--r-- | sonar-server/src/main/webapp/WEB-INF/app/views/project/history.html.erb | 4 |
2 files changed, 8 insertions, 2 deletions
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/models/event.rb b/sonar-server/src/main/webapp/WEB-INF/app/models/event.rb index 7e8633e313f..a865c3d7aae 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/models/event.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/models/event.rb @@ -36,6 +36,12 @@ class Event < ActiveRecord::Base end end + # Use this method to display event description, as missing descriptions are not stored in the same way + # on different DBs (see https://jira.codehaus.org/browse/SONAR-3326) + def description_text + description || '' + end + # # For a given snapshot, checks if an event with the same name & category # exists in the history of the corresponding resource (= in any existing diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/project/history.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/project/history.html.erb index a0a9f0ecd0f..5f019607b55 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/project/history.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/project/history.html.erb @@ -133,11 +133,11 @@ </td> <td class="thin nowrap"> - <%= image_tag "event_alert.png", :alt => (message('project_history.col.alert') + ": " + alert_event.name + ". " + alert_event.description) if alert_event -%> + <%= image_tag "event_alert.png", :alt => (message('project_history.col.alert') + ": " + alert_event.name + ". " + alert_event.description_text) if alert_event -%> </td> <td class="thin nowrap"> - <%= image_tag "event_profile.png", :alt => message('project_history.col.profile') + ": " + profile_event.description if profile_event -%> + <%= image_tag "event_profile.png", :alt => message('project_history.col.profile') + ": " + profile_event.description_text if profile_event -%> </td> <td class="thin nowrap center" style="padding-left:10px; padding-right:10px"> |