]> source.dussan.org Git - redmine.git/commitdiff
Merged r19538 from trunk to 4.0-stable (#33059).
authorGo MAEDA <maeda@farend.jp>
Sat, 29 Feb 2020 14:27:23 +0000 (14:27 +0000)
committerGo MAEDA <maeda@farend.jp>
Sat, 29 Feb 2020 14:27:23 +0000 (14:27 +0000)
git-svn-id: http://svn.redmine.org/redmine/branches/4.0-stable@19544 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/controllers/workflows_controller.rb
test/functional/workflows_controller_test.rb

index c831827cbc4b8ad22f97bfc7f5a5d610a24f7ab0..9f73e8006a587498e805fec3ce88939f54676e0e 100644 (file)
@@ -118,7 +118,7 @@ class WorkflowsController < ApplicationController
   def find_roles
     ids = Array.wrap(params[:role_id])
     if ids == ['all']
-      @roles = Role.sorted.to_a
+      @roles = Role.sorted.select(&:consider_workflow?)
     elsif ids.present?
       @roles = Role.where(:id => ids).to_a
     end
index d33f4558d456c76c188d924eb47c8b384c09c18c..2a71b1a265a2a3c841bdec15d3e6629ef3418090 100644 (file)
@@ -92,8 +92,8 @@ class WorkflowsControllerTest < Redmine::ControllerTest
     get :edit, :params => {:role_id => 'all', :tracker_id => 'all'}
     assert_response :success
 
-    assert_select 'select[name=?][multiple=multiple]', 'role_id[]' do
-      assert_select 'option[selected=selected]', Role.all.select(&:consider_workflow?).count
+    assert_select 'select[name=?]', 'role_id[]' do
+      assert_select 'option[selected=selected][value=all]'
     end
     assert_select 'select[name=?]', 'tracker_id[]' do
       assert_select 'option[selected=selected][value=all]'