From c76c0900bb49973fea7f1a5f1cecd16aadb16b6b Mon Sep 17 00:00:00 2001 From: Go MAEDA Date: Mon, 24 Sep 2018 05:31:13 +0000 Subject: Use the id field as project_key in ProjectCustomField#visibility_by_project_condition by default (#29161). Patch by Holger Just. git-svn-id: http://svn.redmine.org/redmine/trunk@17517 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/models/project_custom_field.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'app') diff --git a/app/models/project_custom_field.rb b/app/models/project_custom_field.rb index 54e7958a3..e038313f8 100644 --- a/app/models/project_custom_field.rb +++ b/app/models/project_custom_field.rb @@ -19,4 +19,9 @@ class ProjectCustomField < CustomField def type_name :label_project_plural end + + def visibility_by_project_condition(project_key=nil, user=User.current, id_column=nil) + project_key ||= "#{Project.table_name}.id" + super(project_key, user, id_column) + end end -- cgit v1.2.3