Defect #24769 » 24769-list-all-members.diff
lib/redmine/field_format.rb (working copy) | ||
---|---|---|
793 | 793 |
end |
794 | 794 |
end |
795 | 795 |
scope.sorted |
796 |
elsif object.nil? |
|
797 |
Principal.member_of(Project.visible.to_a).sorted.select {|p| p.is_a?(User)} |
|
796 | 798 |
else |
797 | 799 |
[] |
798 | 800 |
end |
test/unit/custom_field_user_format_test.rb (working copy) | ||
---|---|---|
25 | 25 |
end |
26 | 26 | |
27 | 27 |
def test_possible_values_options_with_no_arguments |
28 |
assert_equal [], @field.possible_values_options |
|
29 |
assert_equal [], @field.possible_values_options(nil) |
|
28 |
users = Principal.member_of(Project.visible.to_a).sorted.select {|p| p.is_a?(User)} |
|
29 |
options = users.map {|u| [u.name, u.id.to_s]} |
|
30 |
assert_equal options, @field.possible_values_options |
|
31 |
assert_equal options, @field.possible_values_options(nil) |
|
30 | 32 |
end |
31 | 33 | |
32 | 34 |
def test_possible_values_options_with_project_resource |
- « Previous
- 1
- 2
- 3
- Next »