[#69399] project custom field section: for_all controls the toggle

This commit is contained in:
Tobias Dillmann
2025-12-04 15:55:10 +01:00
parent 11d224ef9d
commit 92aee4780d
2 changed files with 6 additions and 4 deletions
@@ -51,9 +51,10 @@ module Projects
end
def active_in_project?
@project_custom_field_project_mappings.any? do |mapping|
mapping.custom_field_id == @project_custom_field.id
end
@project_custom_field.is_for_all? ||
@project_custom_field_project_mappings.any? do |mapping|
mapping.custom_field_id == @project_custom_field.id
end
end
def toggle_path
@@ -70,7 +71,7 @@ module Projects
end
def toggle_enabled?
!@project_custom_field.required?
!@project_custom_field.is_for_all?
end
def toggle_data_attributes
+1
View File
@@ -46,6 +46,7 @@ class CustomValue < ApplicationRecord
delegate :editable?,
:admin_only?,
:required?,
:is_for_all?,
:max_length,
:min_length,
:calculated_value?,