diff options
author | Fabrice Bellingard <fabrice.bellingard@sonarsource.com> | 2013-02-19 14:35:06 +0100 |
---|---|---|
committer | Fabrice Bellingard <fabrice.bellingard@sonarsource.com> | 2013-02-19 15:28:11 +0100 |
commit | e17fe86594ea626cd89e320825052ff5286d2686 (patch) | |
tree | 3c0a2879ef25a9329300a16a3b027921be4e56e3 /sonar-server | |
parent | 9e030c62d373b9fe5699bcb62fac97205d7a4c71 (diff) | |
download | sonarqube-e17fe86594ea626cd89e320825052ff5286d2686.tar.gz sonarqube-e17fe86594ea626cd89e320825052ff5286d2686.zip |
SONAR-4100 When adding a new project, select "Email" by default
Diffstat (limited to 'sonar-server')
-rw-r--r-- | sonar-server/src/main/webapp/WEB-INF/app/controllers/account_controller.rb | 1 | ||||
-rw-r--r-- | sonar-server/src/main/webapp/WEB-INF/app/views/account/_per_project_notifications.html.erb | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/account_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/account_controller.rb index 47e81d1c9d2..6277b81c0cd 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/account_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/account_controller.rb @@ -34,6 +34,7 @@ class AccountController < ApplicationController new_project = Project.by_key params[:new_project] unless @per_project_notifications[new_project.id] @per_project_notifications[new_project.id] = init_project_notifications + @new_project_id = new_project.id end @selected_project_id = new_project.id end diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/account/_per_project_notifications.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/account/_per_project_notifications.html.erb index cc4a61bff16..92e0d301b2a 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/account/_per_project_notifications.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/account/_per_project_notifications.html.erb @@ -59,7 +59,7 @@ <td> <select id="<%= select_id -%>" name="notifications[<%= r_id.to_s -%>][<%= dispatcher-%>][]" multiple style="width: 100%"> <% @channels.each do |channel| -%> - <option value="<%= channel.getKey() -%>" <%= 'selected' if per_project_notif[dispatcher].include?(channel.getKey()) -%>><%= message('notification.channel.' + channel.getKey()) -%></option> + <option value="<%= channel.getKey() -%>" <%= 'selected' if per_project_notif[dispatcher].include?(channel.getKey()) || (r_id==@new_project_id && channel.getKey()=='EmailNotificationChannel') -%>><%= message('notification.channel.' + channel.getKey()) -%></option> <% end %> </select> <script> |