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

fix[Op#54749]: do not show new project mapping button for required custom fields

Kabiru Mwenja0bf9a3359231
diff --git a/app/views/admin/settings/project_custom_fields/project_mappings.html.erb b/app/views/admin/settings/project_custom_fields/project_mappings.html.erb
index 09193be00a5..4b34a40450e 100644
--- a/app/views/admin/settings/project_custom_fields/project_mappings.html.erb
+++ b/app/views/admin/settings/project_custom_fields/project_mappings.html.erb
@@ -35,10 +35,12 @@ See COPYRIGHT and LICENSE files for more details.
%>
<%=
- render(Settings::ProjectCustomFields::ProjectCustomFieldMapping::NewProjectMappingComponent.new(
- project_mapping: @project_mapping,
- project_custom_field: @custom_field
- ))
+ unless @custom_field.required?
+ render(Settings::ProjectCustomFields::ProjectCustomFieldMapping::NewProjectMappingComponent.new(
+ project_mapping: @project_mapping,
+ project_custom_field: @custom_field
+ ))
+ end
%>
<%=