]> source.dussan.org Git - redmine.git/commitdiff
Merged r15742 (#23334).
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Wed, 31 Aug 2016 17:00:22 +0000 (17:00 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Wed, 31 Aug 2016 17:00:22 +0000 (17:00 +0000)
git-svn-id: http://svn.redmine.org/redmine/branches/3.3-stable@15774 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/models/issue.rb

index 5b6ae304185228efa7d8618953bc142ab1ae99e6..9fb27549526569bc71027075748255948925c0b9 100644 (file)
@@ -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