diff options
author | Go MAEDA <maeda@farend.jp> | 2023-04-05 09:22:34 +0000 |
---|---|---|
committer | Go MAEDA <maeda@farend.jp> | 2023-04-05 09:22:34 +0000 |
commit | d7d27374b86fd0fab73487b79d72f9095febebb3 (patch) | |
tree | 6a98c27118c2b83d38debab930cc1c8419086aa5 /test | |
parent | 8ff33f64aa2d35ee9c641c89e8fe680fc239791c (diff) | |
download | redmine-d7d27374b86fd0fab73487b79d72f9095febebb3.tar.gz redmine-d7d27374b86fd0fab73487b79d72f9095febebb3.zip |
Add "Any searchable text" filter for issues (#38402).
Patch by Go MAEDA and Holger Just.
git-svn-id: https://svn.redmine.org/redmine/trunk@22164 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test')
-rw-r--r-- | test/unit/query_test.rb | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/test/unit/query_test.rb b/test/unit/query_test.rb index b41aa507c..2b02a1e07 100644 --- a/test/unit/query_test.rb +++ b/test/unit/query_test.rb @@ -844,6 +844,36 @@ class QueryTest < ActiveSupport::TestCase assert_equal [1, 3], find_issues_with_query(query).map(&:id).sort end + def test_fileter_any_searchable + User.current = User.find(1) + query = IssueQuery.new( + :name => '_', + :filters => { + 'any_searchable' => { + :operator => '~', + :values => ['recipe'] + } + } + ) + result = find_issues_with_query(query) + assert_equal [1, 2, 3], result.map(&:id).sort + end + + def test_fileter_any_searchable_should_search_searchable_custom_fields + User.current = User.find(1) + query = IssueQuery.new( + :name => '_', + :filters => { + 'any_searchable' => { + :operator => '~', + :values => ['125'] + } + } + ) + result = find_issues_with_query(query) + assert_equal [1, 3], result.map(&:id).sort + end + def test_filter_updated_by user = User.generate! Journal.create!(:user_id => user.id, :journalized => Issue.find(2), :notes => 'Notes') |