Skip to content

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

[#64618] improved ambiguity in condition

Eric Schubert5a6f1279c8d9
diff --git a/app/controllers/types_controller.rb b/app/controllers/types_controller.rb
index ee554b8383f..1b24eedeebd 100644
--- a/app/controllers/types_controller.rb
+++ b/app/controllers/types_controller.rb
@@ -60,9 +60,8 @@ class TypesController < ApplicationController
def create
additional_params = {}
- if (value = params.dig(:type, :copy_workflow_from) && value.present?)
- additional_params[:copy_workflow_from] = value
- end
+ value = params.dig(:type, :copy_workflow_from)
+ additional_params[:copy_workflow_from] = value if value.present?
service_call = WorkPackageTypes::CreateService
.new(user: current_user)