mirror of
https://github.com/redmine/redmine.git
synced 2025-11-07 22:05:56 +01:00
"Role" dropdown in Workflow page is unexpectedly expanded when selecting "all" (#33059).
Patch by Mizuki ISHIKAWA. git-svn-id: http://svn.redmine.org/redmine/trunk@19538 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -124,7 +124,7 @@ class WorkflowsController < ApplicationController
|
|||||||
def find_roles
|
def find_roles
|
||||||
ids = Array.wrap(params[:role_id])
|
ids = Array.wrap(params[:role_id])
|
||||||
if ids == ['all']
|
if ids == ['all']
|
||||||
@roles = Role.sorted.to_a
|
@roles = Role.sorted.select(&:consider_workflow?)
|
||||||
elsif ids.present?
|
elsif ids.present?
|
||||||
@roles = Role.where(:id => ids).to_a
|
@roles = Role.where(:id => ids).to_a
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -97,8 +97,8 @@ class WorkflowsControllerTest < Redmine::ControllerTest
|
|||||||
get :edit, :params => {:role_id => 'all', :tracker_id => 'all'}
|
get :edit, :params => {:role_id => 'all', :tracker_id => 'all'}
|
||||||
assert_response :success
|
assert_response :success
|
||||||
|
|
||||||
assert_select 'select[name=?][multiple=multiple]', 'role_id[]' do
|
assert_select 'select[name=?]', 'role_id[]' do
|
||||||
assert_select 'option[selected=selected]', Role.all.count(&:consider_workflow?)
|
assert_select 'option[selected=selected][value=all]'
|
||||||
end
|
end
|
||||||
assert_select 'select[name=?]', 'tracker_id[]' do
|
assert_select 'select[name=?]', 'tracker_id[]' do
|
||||||
assert_select 'option[selected=selected][value=all]'
|
assert_select 'option[selected=selected][value=all]'
|
||||||
|
|||||||
Reference in New Issue
Block a user