From 06b2693f416cb6a2d679fa6e286a4e2c999edf51 Mon Sep 17 00:00:00 2001 From: Ivan Kuchin Date: Mon, 15 Dec 2025 20:38:44 +0100 Subject: [PATCH] allow comments for all field formats https://community.openproject.org/projects/stadt-koeln/work_packages/64264/activity#comment-1607511 --- app/models/custom_field.rb | 2 +- lib/open_project/custom_field_format_dependent.rb | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/app/models/custom_field.rb b/app/models/custom_field.rb index 271731e19e5..938d33be498 100644 --- a/app/models/custom_field.rb +++ b/app/models/custom_field.rb @@ -351,7 +351,7 @@ class CustomField < ApplicationRecord end def can_have_comment? - is_a?(ProjectCustomField) && field_format.in?(%w[bool date float int list user version]) + is_a?(ProjectCustomField) end ## diff --git a/lib/open_project/custom_field_format_dependent.rb b/lib/open_project/custom_field_format_dependent.rb index d48cc4dd230..6b29c3da5bd 100644 --- a/lib/open_project/custom_field_format_dependent.rb +++ b/lib/open_project/custom_field_format_dependent.rb @@ -35,7 +35,6 @@ module OpenProject defaultText: [:except, %w[list bool date text user version hierarchy calculated_value]], enterpriseBanner: [:only, %w[hierarchy]], formula: [:only, %w[calculated_value]], - hasComment: [:only, %w[bool date float int list user version]], length: [:except, %w[list bool date user version link hierarchy calculated_value]], multiSelect: [:only, %w[list user version hierarchy]], possibleValues: [:only, %w[list]],