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

Remove previously_new_record? condition from Project#available_custom_fields

Dombi Attila0f19b7ce9602
diff --git a/app/models/projects/acts_as_customizable_patches.rb b/app/models/projects/acts_as_customizable_patches.rb
index a3366b418ba..2ed2e8b8d04 100644
--- a/app/models/projects/acts_as_customizable_patches.rb
+++ b/app/models/projects/acts_as_customizable_patches.rb
@@ -155,7 +155,7 @@ module Projects::ActsAsCustomizablePatches
#
# additionally we provide the `global` parameter to allow querying the available custom fields on a global level
# when we have explicit control over the call of `available_custom_fields`
- unless new_record? || previously_new_record? || _query_available_custom_fields_on_global_level
+ unless new_record? || _query_available_custom_fields_on_global_level
custom_fields = custom_fields
.where(id: project_custom_field_project_mappings.select(:custom_field_id))
.or(ProjectCustomField.required)