From e9810b5de643513f73ea07445e7d7ded731ef446 Mon Sep 17 00:00:00 2001
From: Jean-Philippe Lang
Date: Sun, 3 Jan 2010 10:50:40 +0000
Subject: [PATCH] Fixed: bulk edit doesn't include global custom fields
(#4505).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3277 e93f8b46-1217-0410-a6f0-8f06a7374b81
---
app/controllers/issues_controller.rb | 2 +-
app/views/issues/bulk_edit.rhtml | 4 ++--
test/functional/issues_controller_test.rb | 2 ++
3 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/app/controllers/issues_controller.rb b/app/controllers/issues_controller.rb
index 2e0ed6fb3..0d7ef7164 100644
--- a/app/controllers/issues_controller.rb
+++ b/app/controllers/issues_controller.rb
@@ -273,7 +273,7 @@ class IssuesController < ApplicationController
return
end
@available_statuses = Workflow.available_statuses(@project)
- @custom_fields = @project.issue_custom_fields.select {|f| f.field_format == 'list'}
+ @custom_fields = @project.all_issue_custom_fields.select {|f| f.field_format == 'list'}
end
def move
diff --git a/app/views/issues/bulk_edit.rhtml b/app/views/issues/bulk_edit.rhtml
index b298c3c46..d8249a8af 100644
--- a/app/views/issues/bulk_edit.rhtml
+++ b/app/views/issues/bulk_edit.rhtml
@@ -46,7 +46,7 @@
<% @custom_fields.each do |custom_field| %>
-
+
<% end %>
@@ -60,5 +60,5 @@
-<%= submit_tag l(:button_submit) %>
+
<%= submit_tag l(:button_submit) %>
<% end %>
diff --git a/test/functional/issues_controller_test.rb b/test/functional/issues_controller_test.rb
index e73e24a05..bf5ffb2b9 100644
--- a/test/functional/issues_controller_test.rb
+++ b/test/functional/issues_controller_test.rb
@@ -946,6 +946,8 @@ class IssuesControllerTest < ActionController::TestCase
get :bulk_edit, :ids => [1, 2]
assert_response :success
assert_template 'bulk_edit'
+ # System wide custom field
+ assert_tag :select, :attributes => {:name => 'custom_field_values[1]'}
end
def test_bulk_edit