From: Jean-Philippe Lang Date: Wed, 31 Aug 2016 17:00:22 +0000 (+0000) Subject: Merged r15742 (#23334). X-Git-Tag: 3.3.1~33 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=9d33ec22ccf09d6a82d6b8af841ab3f396029a5f;p=redmine.git Merged r15742 (#23334). git-svn-id: http://svn.redmine.org/redmine/branches/3.3-stable@15774 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/app/models/issue.rb b/app/models/issue.rb index 5b6ae3041..9fb275495 100644 --- a/app/models/issue.rb +++ b/app/models/issue.rb @@ -568,8 +568,9 @@ class Issue < ActiveRecord::Base # Returns the custom_field_values that can be edited by the given user def editable_custom_field_values(user=nil) + read_only = read_only_attribute_names(user) visible_custom_field_values(user).reject do |value| - read_only_attribute_names(user).include?(value.custom_field_id.to_s) + read_only.include?(value.custom_field_id.to_s) end end