"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:
Go MAEDA
2020-02-29 04:59:48 +00:00
parent 12ad0677cc
commit 6b0afdc9ca
2 changed files with 3 additions and 3 deletions

View File

@@ -124,7 +124,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