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

limit Projects tab to work packages and project custom fields

ulferts4e02aea21706
diff --git a/app/components/admin/custom_fields/edit_form_header_component.rb b/app/components/admin/custom_fields/edit_form_header_component.rb
index 9490ed23340..cb60d1ff695 100644
--- a/app/components/admin/custom_fields/edit_form_header_component.rb
+++ b/app/components/admin/custom_fields/edit_form_header_component.rb
@@ -52,12 +52,15 @@ module Admin
}
end
- tabs <<
- {
- name: "custom_field_projects",
- path: custom_field_projects_path(@custom_field),
- label: t(:label_project_plural)
- }
+ if @custom_field.is_a?(WorkPackageCustomField) ||
+ @custom_field.is_a?(ProjectCustomField)
+ tabs <<
+ {
+ name: "custom_field_projects",
+ path: custom_field_projects_path(@custom_field),
+ label: t(:label_project_plural)
+ }
+ end
tabs
end