Project

General

Profile

Defect #24769 » 24769-list-all-members.diff

patch - Go MAEDA, 2017-01-17 09:23

View differences:

lib/redmine/field_format.rb (working copy)
end
end
scope.sorted
elsif object.nil?
Principal.member_of(Project.visible.to_a).sorted.select {|p| p.is_a?(User)}
else
[]
end
test/unit/custom_field_user_format_test.rb (working copy)
end
def test_possible_values_options_with_no_arguments
assert_equal [], @field.possible_values_options
assert_equal [], @field.possible_values_options(nil)
users = Principal.member_of(Project.visible.to_a).sorted.select {|p| p.is_a?(User)}
options = users.map {|u| [u.name, u.id.to_s]}
assert_equal options, @field.possible_values_options
assert_equal options, @field.possible_values_options(nil)
end
def test_possible_values_options_with_project_resource
(3-3/3)