Feature #4939

List of tasks filtered as OR and not AND

Added by Alain V. almost 8 years ago. Updated 22 days ago.

Status:NewStart date:2010-02-26
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:Issues filter
Target version:-
Resolution:

Description

Hello

Up to now in the list of task you can filter upon some values but the list of filters are
List of tasks that has
filter1=value1 AND filter2=value2 AND filter3=value3

I think it could be interesting to have the possibility of
List of tasks that has
filter1=value1 OR filter2=value2 OR filter3=value3

Do you think it is possible? thank you

Redmine using OR.zip (11.5 KB) Quan VN, 2013-09-19 11:45

_query.zip - Plugins version, better than the patch version above (3.56 KB) Quan VN, 2015-11-20 02:49

_query.0.0.3.rm34.zip (4.38 KB) Quan VN, 2017-10-27 04:20


Related issues

Related to Redmine - Feature #10999: Ticket list filter: More flexible filter conditions New
Duplicated by Redmine - Feature #7641: Issue filter with OR semantic additional to current AND s... Closed 2011-02-17
Duplicated by Redmine - Feature #12970: Implement the "OR" operator in queries Closed
Duplicated by Redmine - Feature #6332: "OR" filter and not only "AND" filter Closed 2010-09-08
Duplicated by Redmine - Feature #10421: Filter with OR conditions Closed
Duplicated by Redmine - Feature #21532: Adding OR and XOR request to REST API and issue filters Closed
Duplicated by Redmine - Feature #23211: Issue filter menu should have different logical operators... Closed
Duplicated by Redmine - Feature #23216: Issues List, Enhanced Filtering - Allowing Multiple Queri... Closed

History

#1 Updated by Jean-Philippe Lang almost 8 years ago

  • Category set to Issues

#2 Updated by Andrew Sherman over 7 years ago

+1. This would be useful for some filters I have tried to make as well.

#3 Updated by Jeremy Walker over 7 years ago

+1 I would love it if Redmine had this functionality. Perhaps the easiest/most powerful way to implement this would be to make a way for users to create filters out of combinations of other filters. In other words, if I could define filters A, B, and C, and then say something like "Give me all the issues that are in A OR B, but not in C", I could get any issue list I could ever want. And that would be awesome.

#4 Updated by Jeremy Walker over 7 years ago

Jeremy Walker wrote:

+1 I would love it if Redmine had this functionality. Perhaps the easiest/most powerful way to implement this would be to make a way for users to create filter sets out of combinations of other filter sets. In other words, if I could define filter sets A, B, and C, and then say something like "Give me all the issues that are in A OR B, but not in C", I could get any issue list I could ever want. And that would be awesome.

#5 Updated by Alain V. over 7 years ago

Any progress on this subject guys? ;o)

#6 Updated by Matthias Neubert almost 7 years ago

+1
Thats nearly what I ment with #7641, but I'd like to combine AND and OR freely.

e.g. A AND B OR C AND D

should list all issues which fullfill both, A and B

plus the issue which fillfill both, C and D

Basically it should be read like disjunctive normal form

#7 Updated by Matthias Neubert almost 7 years ago

also this could be interesting when one wants to list all issues
assigned to me, and also all which aren't assigned yet.

for this feature a filtercriteria must be usable more than one time

or other solution: the list of possible assignees contains a special element "Not assigned" at the top of the list, so one can select (by multiple selection) me and "Not assigned"

#8 Updated by Gurvan Le Dromaguet almost 5 years ago

It looks like it is implemented in "Trac": http://trac.edgewall.org/query, see the "OR" at the bottom right of the filters box

#9 Updated by Francesco V over 4 years ago

Gurvan Le Dromaguet wrote:

It looks like it is implemented in "Trac": http://trac.edgewall.org/query, see the "OR" at the bottom right of the filters box

I like it

#10 Updated by Daniel Felix over 4 years ago

Yes this would be a good improvement. It won't be easy but a really cool addition to the current filter-system.

#11 Updated by Christian Baus over 4 years ago

+1

any workaround here? we need a filter like "is autor or observer"

#12 Updated by Dani Leni over 4 years ago

+1

Need Assignee or Watcher.

#14 Updated by Quan VN about 4 years ago

Here is my quick and dirty solution. I am not a RoR developer and this is my very first attempt so that I can use Redmine for my job.
I hope that someone can make this into a full plugin. If you have any idea or find problem, please let me know. I will see if I can do anything. Thanks

#15 Updated by Christian Baus about 4 years ago

Thanks for your patch! i look forward to implement that in our redmine!!

#16 Updated by Zbynek Drlik about 4 years ago

+1

#17 Updated by Lu Su over 3 years ago

+1

#18 Updated by Antoine Pichon over 3 years ago

+1 (thanks for your excellent work)

#19 Updated by Toshi MARUYAMA over 3 years ago

#20 Updated by Toshi MARUYAMA over 3 years ago

#21 Updated by Toshi MARUYAMA over 3 years ago

#22 Updated by James H over 3 years ago

+1

#23 Updated by Sebastian Paluch almost 3 years ago

Matthias Neubert wrote:

+1
Thats nearly what I ment with #7641, but I'd like to combine AND and OR freely.

e.g. A AND B OR C AND D

should list all issues which fullfill both, A and B

plus the issue which fillfill both, C and D

Basically it should be read like disjunctive normal form

+1

so important feature and no progress for 5 years :(

#24 Updated by Jan Niggemann (redmine.org team member) almost 3 years ago

so important feature and no progress for 5 years :(

We only have 2 programmers working in their spare time, plus contributions from a few other volunteers.

If you send patches that apply cleanly against current trunk (together with tests) we'd happily test and apply those.

#25 Updated by Istvan Heckl about 2 years ago

+1

#26 Updated by Quan VN about 2 years ago

I have made this patch into a plugins here (with some improvement). It works with redmine 2.6.x and 3.1.1 or less. Please use the plugin instead of this patch

http://www.redmine.org/plugins/zquery

#27 Updated by Jānis Elmeris about 2 years ago

+1

#28 Updated by Quan VN about 2 years ago

#29 Updated by Toshi MARUYAMA almost 2 years ago

  • Duplicated by Feature #21532: Adding OR and XOR request to REST API and issue filters added

#30 Updated by Fred B over 1 year ago

What is the difference between zquery and _query?

Did someone tested one with Redmine 2.4?

#31 Updated by Quan VN over 1 year ago

Fred B wrote:

What is the difference between zquery and _query?

Did someone tested one with Redmine 2.4?

Dear Fred
1. They are the same but I renamed zquery to _query so it is loaded first. _query is now the "official" version :-) (I have replace zquery attachment with _query but the name is still in the link)
2. I think it should work with 2.3 upward since I developed it based on 2.3 version
Quan

#32 Updated by Toshi MARUYAMA over 1 year ago

  • Duplicated by Feature #23211: Issue filter menu should have different logical operators like "AND", "OR", ... added

#33 Updated by Toshi MARUYAMA over 1 year ago

  • Category changed from Issues to Issues filter

#34 Updated by Toshi MARUYAMA over 1 year ago

  • Duplicated by Feature #23216: Issues List, Enhanced Filtering - Allowing Multiple Queries & "OR"-type constraints added

#35 Updated by JW Fuchs over 1 year ago

+1

#36 Updated by Iwadara I 7 months ago

+1

#37 Updated by Reto Stamm 6 months ago

+1

#38 Updated by Yuuki NARA 6 months ago

+1

#39 Updated by Santiago Torres 5 months ago

+1

#40 Updated by Shaun Gilroy about 1 month ago

So is there any chance that the _query plugin getting updated to function with Redmine 3.4? I tried to figure out how to update it, but it's not clear to me what needs to be changed to make it compatible.

It gives me the following error in 3.4 as is:

Showing /opt/redmine/app/views/queries/_filters.html.erb where line #4 raised:

undefined method `remote' for #<Hash:0x007fe319fa1de8>
Extracted source (around line #464):
462
463
464
465
466
467

    available_filters.each do |field, filter|
      options = {:type => filter[:type], :name => filter[:name]}
      options[:remote] = true if filter.remote

      if has_filter?(field) || !filter.remote
        options[:values] = filter.values

Trace of template inclusion: app/views/queries/_query_form.html.erb, app/views/issues/index.html.erb

Rails.root: /Users/noysh/projects/farview/farview-devlink-3.4-stable

Application Trace | Framework Trace | Full Trace
app/models/query.rb:464:in `block in available_filters_as_json'
app/models/query.rb:462:in `each'
app/models/query.rb:462:in `available_filters_as_json'
app/views/queries/_filters.html.erb:4:in `block in _app_views_queries__filters_html_erb__941875204378063440_70306769152520'
app/views/queries/_filters.html.erb:1:in `_app_views_queries__filters_html_erb__941875204378063440_70306769152520'
app/views/queries/_query_form.html.erb:10:in `_app_views_queries__query_form_html_erb___1924681068357817272_70306752298920'
app/views/issues/index.html.erb:11:in `block in _app_views_issues_index_html_erb___4300101081652184242_70306752230600'
app/views/issues/index.html.erb:10:in `_app_views_issues_index_html_erb___4300101081652184242_70306752230600'
app/controllers/issues_controller.rb:51:in `block (2 levels) in index'
app/controllers/issues_controller.rb:46:in `index'
lib/redmine/sudo_mode.rb:63:in `sudo_mode'
Request

Parameters:

{"project_id"=>"project_name"}
Toggle session dump
Toggle env dump
Response

Headers:

None

#41 Updated by Quan VN about 1 month ago

Shaun Gilroy wrote:

So is there any chance that the _query plugin getting updated to function with Redmine 3.4? I tried to figure out how to update it, but it's not clear to me what needs to be changed to make it compatible.

It gives me the following error in 3.4 as is:
[...]

Dear Shaun
I am sorry. This version of plugin is too old. I create a separate entry for this plugin and put the update here and it works with redmine 3.4
https://www.redmine.org/plugins/boolean_query
Unfortunately I cannot find way to delete this old attachment
Quan

#42 Updated by Quan VN about 1 month ago

For redmine 3.4, please use the version at
https://www.redmine.org/plugins/boolean_query
Or use new version attached here _query.0.0.3.rm34.zip

#43 Updated by Shaun Gilroy about 1 month ago

Quan VN wrote:

For redmine 3.4, please use the version at
https://www.redmine.org/plugins/boolean_query
Or use new version attached here _query.0.0.3.rm34.zip

Excellent! Thank you!

#44 Updated by Roman Yagodin 22 days ago

+1

It could be great to allow filters with multiple conditions by same field (e.g. status is "open" AND status is not feedback) also.

Also available in: Atom PDF