Filter by issue id (#4806).

A shortcut is added to the context menu to filter the selected issues.

git-svn-id: http://svn.redmine.org/redmine/trunk@15371 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2016-05-06 18:59:36 +00:00
parent 860ae0631a
commit 699a75910d
8 changed files with 39 additions and 7 deletions

View File

@@ -235,6 +235,14 @@ class QueryTest < ActiveSupport::TestCase
assert_equal 2, issues.first.id
end
def test_operator_is_on_integer_should_accept_comma_separated_values
query = IssueQuery.new(:name => '_')
query.add_filter("issue_id", '=', ['1,3'])
issues = find_issues_with_query(query)
assert_equal 2, issues.size
assert_equal [1,3], issues.map(&:id).sort
end
def test_operator_is_on_integer_custom_field
f = IssueCustomField.create!(:name => 'filter', :field_format => 'int', :is_for_all => true, :is_filter => true, :trackers => Tracker.all)
CustomValue.create!(:custom_field => f, :customized => Issue.find(1), :value => '7')