OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
add work package editor role to workflow administration
ulfertsa34297706440
diff --git a/app/controllers/workflows_controller.rb b/app/controllers/workflows_controller.rbindex becf8b16637..64d02d40f9a 100644--- a/app/controllers/workflows_controller.rb+++ b/app/controllers/workflows_controller.rb@@ -124,15 +124,15 @@ class WorkflowsController < ApplicationControllerenddef find_roles- @roles = ProjectRole.order(Arel.sql('builtin, position'))+ @roles = eligible_roles.order(:builtin, :position)enddef find_types- @types = ::Type.order(Arel.sql('position'))+ @types = ::Type.order(:position)enddef find_role- @role = ProjectRole.find(params[:role_id])+ @role = eligible_roles.find(params[:role_id])enddef find_type@@ -140,10 +140,15 @@ class WorkflowsController < ApplicationControllerenddef find_optional_role- @role = ProjectRole.find_by(id: params[:role_id])+ @role = eligible_roles.find_by(id: params[:role_id])enddef find_optional_type@type = ::Type.find_by(id: params[:type_id])end++ def eligible_roles+ Role.where(type: ProjectRole.name)+ .or(Role.where(builtin: Role::BUILTIN_WORK_PACKAGE_EDITOR))+ endend