mirror of
https://github.com/meineerde/redmine.git
synced 2025-12-19 15:01:14 +00:00
Don't bulk edit file custom fields (#6719).
git-svn-id: http://svn.redmine.org/redmine/trunk@15923 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
eb023bdcce
commit
73ef85f672
@ -45,7 +45,7 @@ class ContextMenusController < ApplicationController
|
||||
|
||||
@options_by_custom_field = {}
|
||||
if @can[:edit]
|
||||
custom_fields = @issues.map(&:editable_custom_fields).reduce(:&).reject(&:multiple?)
|
||||
custom_fields = @issues.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?
|
||||
|
||||
@ -251,7 +251,7 @@ class IssuesController < ApplicationController
|
||||
end
|
||||
end
|
||||
|
||||
@custom_fields = edited_issues.map{|i|i.editable_custom_fields}.reduce(:&)
|
||||
@custom_fields = edited_issues.map{|i|i.editable_custom_fields}.reduce(:&).select {|field| field.format.bulk_edit_supported}
|
||||
@assignables = target_projects.map(&:assignable_users).reduce(:&)
|
||||
@versions = target_projects.map {|p| p.shared_versions.open}.reduce(:&)
|
||||
@categories = target_projects.map {|p| p.issue_categories}.reduce(:&)
|
||||
|
||||
@ -79,6 +79,10 @@ module Redmine
|
||||
class_attribute :totalable_supported
|
||||
self.totalable_supported = false
|
||||
|
||||
# Set this to false if field cannot be bulk edited
|
||||
class_attribute :bulk_edit_supported
|
||||
self.bulk_edit_supported = true
|
||||
|
||||
# Restricts the classes that the custom field can be added to
|
||||
# Set to nil for no restrictions
|
||||
class_attribute :customized_class_names
|
||||
@ -861,6 +865,7 @@ module Redmine
|
||||
self.form_partial = 'custom_fields/formats/attachment'
|
||||
self.is_filter_supported = false
|
||||
self.change_no_details = true
|
||||
self.bulk_edit_supported = false
|
||||
field_attributes :extensions_allowed
|
||||
|
||||
def set_custom_field_value(custom_field, custom_field_value, value)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user