Feature #10999

Ticket list filter: More flexible filter conditions

Added by Frank Helk over 7 years ago. Updated over 1 year ago.

Status:NewStart date:
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:Issues filter
Target version:-
Resolution:

Description

I have not found any workaround on that by now ...

As far as I understand it, the filter conditions for the ticket list (text fields) filter on an exact phrase in any case. With that behaviour, I can't filter for tickets containing i.e. 2 words at random positions in the field. Normally I would circumvent that by just adding another filter on the same field, but unfortunately that is blocked - only one condition per field is allowed.

I would suggest to either

- allow multiple filter conditions on the same field, connected by "AND", or
- implement some kind of optional pattern search like RegEx, or
- (preferred) implement search pattern interpretation rules for text fields, like a choice of
"exact phrase / all words (AND) / any word (OR) / RegEx" as drop down list.


Related issues

Related to Redmine - Feature #1140: Filtering using more than one instance of each field New 2008-04-29
Related to Redmine - Feature #4939: List of tasks filtered as OR and not AND New 2010-02-26
Related to Redmine - Feature #13635: Filtering issues by comparing two custom fields against e... New
Duplicated by Redmine - Feature #23216: Issues List, Enhanced Filtering - Allowing Multiple Queri... Closed

History

#1 Updated by Daniel Albuschat about 7 years ago

The first suggestion is related to #1140.

#2 Updated by peter longfield over 6 years ago

+1 see also #6332

#3 Updated by Ralph Twele over 6 years ago

+1

#4 Updated by Markus Garscha about 6 years ago

+1

#6 Updated by @ go2null over 5 years ago

+1

Would also like to see it for (multi-select) lists:
  • any of (replaces is)
  • none of (replaces is not)
  • all of
  • not all of
  • is empty (replaces none)
  • is not empty (replaces any)

#7 Updated by @ go2null over 5 years ago

Note: you can currently filter text fields thus:
field contains value1%value2

Obvious caveat: value1 must be before value2 in field.

#8 Updated by Toshi MARUYAMA over 5 years ago

  • Related to deleted (Feature #6332: "OR" filter and not only "AND" filter)

#9 Updated by txemi M about 4 years ago

+1.

I would suggest allowing to bypass UI filter limitations accepting a query expressed in query language.
With this, next goals would be achieved:

  • Not adding complexity to current user interface, no need to develop complex user interface to express complex queries.
  • Easy to develop if query language matchs internal query ruby on rails languages (I am not a ruby developer, I am not sure how queries are expressed internally, but if so, sure the patch to achieve this would be very small).
  • Queries would not be limited to user interface, offering all features availables at backend.
  • Any user with some development hability could express any query.

At front end option to use query language instead of current form should be offered to users.

Any ruby on rails developer could throw an opinion on this, is it feasible?

#10 Updated by Istvan Heckl about 4 years ago

+1 :)

#11 Updated by Jānis Elmeris almost 4 years ago

+1

#12 Updated by Hide MATSUTANI over 3 years ago

+1

I think it's better if we could choose in the 'list' formatted custom fields.

@ go2null wrote:

+1

Would also like to see it for (multi-select) lists:
  • any of (replaces is)
  • none of (replaces is not)
  • all of
  • not all of
  • is empty (replaces none)
  • is not empty (replaces any)

#13 Updated by Jared Davenport over 3 years ago

+1

#14 Updated by Toshi MARUYAMA over 3 years ago

  • Category changed from UI to Issues filter

#15 Updated by Toshi MARUYAMA over 3 years ago

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

#16 Updated by JW Fuchs over 3 years ago

+1

#17 Updated by Jean Louis about 3 years ago

+10

I don't find plugin that do this, I try _query plugin but it's between 2 different filters.
I want to search (any of) words in only issues description filter, for example: word1 OR word2

@ go2null wrote:

Would also like to see it for (multi-select) lists:
  • any of (replaces is)
  • none of (replaces is not)
  • all of
  • not all of
  • is empty (replaces none)
  • is not empty (replaces any)

#18 Updated by Quan VN about 3 years ago

Dear Jean Louis
Thank you for your note. I see your point. For the list type fields, this is built-in as far as I understand. For text field in general, I will try to see if I can implement something like your suggestion.
Quan

Jean Louis wrote:

+10

I don't find plugin that do this, I try _query plugin but it's between 2 different filters.
I want to search (any of) words in only issues description filter, for example: word1 OR word2

@ go2null wrote:

Would also like to see it for (multi-select) lists:
  • any of (replaces is)
  • none of (replaces is not)
  • all of
  • not all of
  • is empty (replaces none)
  • is not empty (replaces any)

#19 Updated by Quan VN about 3 years ago

Update on July 24
@Jean Louis: Thank you again for your suggestion. I have implemented the two operators on the text field allowing to do boolean search within a text field, so you can search something like:

(word1 OR word 2) AND word3 AND NOT word4.

Please help me to test it here. (it is updated version of _query)

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

Jean Louis wrote:

+10

I don't find plugin that do this, I try _query plugin but it's between 2 different filters.
I want to search (any of) words in only issues description filter, for example: word1 OR word2

@ go2null wrote:

Would also like to see it for (multi-select) lists:
  • any of (replaces is)
  • none of (replaces is not)
  • all of
  • not all of
  • is empty (replaces none)
  • is not empty (replaces any)

#20 Updated by Andreas F almost 3 years ago

Any news about this topic? We need the possibility to use and/or conditions. Also we need the possibility to filter project tags ...

A must have :)

#21 Updated by Frank Helk almost 3 years ago

Doesn't look like there are any news on this. I'm still waiting for it, with some constantly nagging users in my back :(

BTW: I don't think that this functionality is a candidate for a plugin ... it should definitely be part of the Redmine core package.

#22 Updated by Robert Mulvey over 2 years ago

+1

#23 Updated by JW Fuchs over 2 years ago

+1

#24 Updated by Susana Mielgo over 2 years ago

+1

#25 Updated by Mike Kozhurin over 2 years ago

+1

#27 Updated by Frank Helk over 2 years ago

Hmmm - I see constantly dripping in "+1" from people who would like to have that too, but the issue is active for 5 years now w/o anybody feeling the urge to implement it.

Any hint how to draw a bit attention on this ?

#28 Updated by Abuzer N over 2 years ago

+1 this is so needed

#29 Updated by Yu AOKI about 2 years ago

@Quan VN
Thank you for boolean_query plugin.
When I tested it on redmine 3.1.0, I've got a NoMethodError on 'sql_contains', so I needed to modify line 175 on query_patch2.rb as follows:
(This is just FYI, since I am not exactly sure if 3.1.0 is under support, nor how I can contribute on this plugin, such as pull request.)

[before mod]
sql <<  "(" + sql_contains("#{db_table}.#{db_field}", term, match) + ")" 

[after mod]
sql <<  "(" + "LOWER(#{db_table}.#{db_field}) LIKE '%#{self.class.connection.quote_string(term.to_s.downcase)}%'" + ")" 

Thanks.

Quan VN wrote:

Update on July 24
@Jean Louis: Thank you again for your suggestion. I have implemented the two operators on the text field allowing to do boolean search within a text field, so you can search something like:

(word1 OR word 2) AND word3 AND NOT word4.

Please help me to test it here. (it is updated version of _query)

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

Jean Louis wrote:

+10

I don't find plugin that do this, I try _query plugin but it's between 2 different filters.
I want to search (any of) words in only issues description filter, for example: word1 OR word2

@ go2null wrote:

Would also like to see it for (multi-select) lists:
  • any of (replaces is)
  • none of (replaces is not)
  • all of
  • not all of
  • is empty (replaces none)
  • is not empty (replaces any)

#30 Updated by Frank Helk about 2 years ago

Just an additional opinion:

Creating some plugin is nice, but I presume that plugins are a measure for very special problems like interfacing to other software and tasks not close to Redmine's core functionality. Unfortunately then features requested here affect (tune up ? dope ? ;-) a very core part of Redmine, and I'd prefer them to be realized where they belong: In the core of Redmine.

Besides of that plugins tend to get unsupported with time moving on, and every new Redmine release bears the risk of breaking the plugin. I wouldn't recommend to expose such a core-near feature to that vulnerability.

#31 Updated by Roman Yagodin about 2 years ago

+1

Could not create a simple "Issues created or closed today" query without OR!

#32 Updated by name zero over 1 year ago

+1 :}

Also available in: Atom PDF