]> source.dussan.org Git - redmine.git/commitdiff
Don't bulk edit file custom fields (#6719).
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Sun, 23 Oct 2016 11:51:26 +0000 (11:51 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Sun, 23 Oct 2016 11:51:26 +0000 (11:51 +0000)
git-svn-id: http://svn.redmine.org/redmine/trunk@15924 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/controllers/context_menus_controller.rb
app/controllers/timelog_controller.rb

index bdec1fccf03f995bfc84cc3ce6fd41f88dc2e61d..b2f807cea604daba12e0181592d74d51e6fe87c8 100644 (file)
@@ -75,7 +75,7 @@ class ContextMenusController < ApplicationController
 
     @options_by_custom_field = {}
     if @can[:edit]
-      custom_fields = @time_entries.map(&:editable_custom_fields).reduce(:&).reject(&:multiple?)
+      custom_fields = @time_entries.map(&:editable_custom_fields).reduce(:&).reject(&:multiple?).select {|field| field.format.bulk_edit_supported}
       custom_fields.each do |field|
         values = field.possible_values_options(@projects)
         if values.present?
index cab4a5d214654883383e2946c5e8245790e88039..cb747b27322a7e82d5eb8ff131d3ec1ee3d5adeb 100644 (file)
@@ -168,7 +168,7 @@ class TimelogController < ApplicationController
 
   def bulk_edit
     @available_activities = TimeEntryActivity.shared.active
-    @custom_fields = TimeEntry.first.available_custom_fields
+    @custom_fields = TimeEntry.first.available_custom_fields.select {|field| field.format.bulk_edit_supported}
   end
 
   def bulk_update