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
Check visibility on required custom fields
Oliver Güntherc82e4ea5a075
diff --git a/app/models/projects/custom_fields.rb b/app/models/projects/custom_fields.rbindex 8ae6368f04d..c939af9fb10 100644--- a/app/models/projects/custom_fields.rb+++ b/app/models/projects/custom_fields.rb@@ -42,7 +42,7 @@ module Projects::CustomFieldsreturn all_visible_custom_fields if new_record?all_visible_custom_fields.where(id: project_custom_field_project_mappings.select(:custom_field_id))- .or(ProjectCustomField.required)+ .or(required_visible_custom_fields)end# Note:@@ -64,6 +64,10 @@ module Projects::CustomFieldsall_available_custom_fields.visible(project: self)end+ def required_visible_custom_fields+ ProjectCustomField.required.visible(project: self)+ end+def custom_field_values_to_validate# Limit the set of available custom fields when the validation is limited to a sectionif _limit_custom_fields_validation_to_section_id