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
[#64348] Names
Tobias Dillmann9065bfb775a1
diff --git a/app/models/custom_field/calculated_value.rb b/app/models/custom_field/calculated_value.rbindex 2e6d64fa23d..22729ce9a8a 100644--- a/app/models/custom_field/calculated_value.rb+++ b/app/models/custom_field/calculated_value.rb@@ -87,7 +87,7 @@ module CustomField::CalculatedValue# We can only validate used custom fields from a high-level perspective, since at this point in validation,# we do not have a project context to check against. So we cannot check if the custom fields are actually# enabled for a project and visible to a non-admin user.- formula_cfs = cf_ids_used_in_formula(formula_string)+ formula_cfs = formula_referenced_custom_field_idsallowed_cfs = usable_custom_field_references_for_formula.pluck(:id)surplus_cfs = formula_cfs - allowed_cfsdiff --git a/spec/models/custom_field/calculated_value_spec.rb b/spec/models/custom_field/calculated_value_spec.rbindex b781fec8514..41dec192a40 100644--- a/spec/models/custom_field/calculated_value_spec.rb+++ b/spec/models/custom_field/calculated_value_spec.rb@@ -195,7 +195,7 @@ RSpec.describe CustomField::CalculatedValue, with_flag: { calculated_value_projeendend- describe "#formula_contains_reference_to_id?" do+ describe "#formula_references_id?" dolet!(:int_field) { create(:project_custom_field, :integer, default_value: 10, is_for_all: true) }let!(:float_field) { create(:project_custom_field, :float, default_value: 5.5, is_for_all: true) }let!(:text_field) { create(:project_custom_field, :text, default_value: "text", is_for_all: true) }