Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

avoid projects being displayed twice

ulfertsa7835ac072a4
diff --git a/app/views/users/_mail_notifications.html.erb b/app/views/users/_mail_notifications.html.erb
index c709bd7aac5..2e0b90dcfd9 100644
--- a/app/views/users/_mail_notifications.html.erb
+++ b/app/views/users/_mail_notifications.html.erb
@@ -53,7 +53,7 @@ See docs/COPYRIGHT.rdoc for more details.
<section class="hide-section" data-section-name="notified_projects" <%= @user.mail_notification == 'selected' ? '' : 'hidden' %>>
<div id="notified-projects" class="form--field -no-label">
<div class="form--field-container -vertical">
- <% @user.projects.each do |project| %>
+ <% @user.projects.distinct.each do |project| %>
<label class="form--label-with-check-box">
<%= styled_check_box_tag 'notified_project_ids[]',
project.id,