From c2b977548393733342d3ea3deb798e3309a4f59a Mon Sep 17 00:00:00 2001 From: Marcin Date: Sat, 3 Sep 2022 00:25:37 +0200 Subject: [PATCH] custom fields fix and compatibility confirmation --- app/models/ready_footer.rb | 2 +- init.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/ready_footer.rb b/app/models/ready_footer.rb index de357f6..d4c51d6 100644 --- a/app/models/ready_footer.rb +++ b/app/models/ready_footer.rb @@ -104,7 +104,7 @@ def roles def custom CustomValue.includes(:custom_field).where( - custom_field: {type: 'UserCustomField'}, + custom_fields: {type: 'UserCustomField'}, customized_type: 'Principal', customized_id: user.id) .map{|custom| {custom.custom_field.name => custom.value.strip}}.reduce({}, :merge) diff --git a/init.rb b/init.rb index 5449939..33b0471 100644 --- a/init.rb +++ b/init.rb @@ -27,7 +27,7 @@ version '0.5.0' url 'https://readyredmine.com' author_url 'https://readyredmine.com' - requires_redmine :version_or_higher => '5.0.0' + requires_redmine :version => '4.1.0'..'5.0.2' settings :default => { 'ready_footer' => false, 'ready_footer_body' => 'Best regards,
{first_name} {last_name}',