summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2009-05-13 16:06:14 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2009-05-13 16:06:14 +0000
commite5ed2b0f73f3a7ac1f87eb3a78878d0be892dbae (patch)
treee661ba23b93dbe6dd09d5fbed899581974cb4d09
parent566d0a6ceb12cab07f20469e2bde67f4200202dd (diff)
downloadredmine-e5ed2b0f73f3a7ac1f87eb3a78878d0be892dbae.tar.gz
redmine-e5ed2b0f73f3a7ac1f87eb3a78878d0be892dbae.zip
Fixed: issue bulk edit view broken by r2726 (#3347).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2739 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r--app/controllers/issues_controller.rb2
-rw-r--r--test/functional/issues_controller_test.rb7
2 files changed, 8 insertions, 1 deletions
diff --git a/app/controllers/issues_controller.rb b/app/controllers/issues_controller.rb
index d5ce9512e..06a654b24 100644
--- a/app/controllers/issues_controller.rb
+++ b/app/controllers/issues_controller.rb
@@ -273,7 +273,7 @@ class IssuesController < ApplicationController
end
# Find potential statuses the user could be allowed to switch issues to
@available_statuses = Workflow.find(:all, :include => :new_status,
- :conditions => {:role_id => current_role.id}).collect(&:new_status).compact.uniq.sort
+ :conditions => {:role_id => User.current.roles_for_project(@project).collect(&:id)}).collect(&:new_status).compact.uniq.sort
@custom_fields = @project.issue_custom_fields.select {|f| f.field_format == 'list'}
end
diff --git a/test/functional/issues_controller_test.rb b/test/functional/issues_controller_test.rb
index c7b32e0ed..f47e384a5 100644
--- a/test/functional/issues_controller_test.rb
+++ b/test/functional/issues_controller_test.rb
@@ -831,6 +831,13 @@ class IssuesControllerTest < Test::Unit::TestCase
:content => notes
assert_tag :input, :attributes => { :name => 'time_entry[hours]', :value => "2z" }
end
+
+ def test_get_bulk_edit
+ @request.session[:user_id] = 2
+ get :bulk_edit, :ids => [1, 2]
+ assert_response :success
+ assert_template 'bulk_edit'
+ end
def test_bulk_edit
@request.session[:user_id] = 2