summaryrefslogtreecommitdiffstats
path: root/app/views/custom_fields/_form.html.erb
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/custom_fields/_form.html.erb')
-rw-r--r--app/views/custom_fields/_form.html.erb3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/views/custom_fields/_form.html.erb b/app/views/custom_fields/_form.html.erb
index 99fffadeb..7c79189ac 100644
--- a/app/views/custom_fields/_form.html.erb
+++ b/app/views/custom_fields/_form.html.erb
@@ -102,8 +102,9 @@ when "IssueCustomField" %>
</fieldset>
<fieldset class="box" id="custom_field_project_ids"><legend><%= l(:label_project_plural) %></legend>
+ <% project_ids = @custom_field.project_ids.to_a %>
<%= render_project_nested_lists(Project.all) do |p|
- content_tag('label', check_box_tag('custom_field[project_ids][]', p.id, @custom_field.projects.to_a.include?(p), :id => nil) + ' ' + p)
+ content_tag('label', check_box_tag('custom_field[project_ids][]', p.id, project_ids.include?(p.id), :id => nil) + ' ' + p)
end %>
<%= hidden_field_tag('custom_field[project_ids][]', '', :id => nil) %>
<p><%= check_all_links 'custom_field_project_ids' %></p>