Edgewall Software
Modify

Opened 12 years ago

Last modified 4 years ago

#5526 new enhancement

Support LIKE and wildcards in custom queries

Reported by: koegl@… Owned by:
Priority: normal Milestone: next-major-releases
Component: report system Version:
Severity: normal Keywords: query field
Cc: shansen@…, osimons Branch:
Release Notes:
API Changes:

Description

For many fields (component, version, milestone, …) only "is" and "is not" are present as options in the filter combo box. For my application I would need at least "like" (processed as SQL's LIKE) in addition to that.

Without this capability I cannot currently dispense with the report modules (which, as I read, is being phased out in favor of the query module).

Attachments (0)

Change History (10)

comment:1 by anonymous, 12 years ago

Summary: Support LIKE and wildcards in custom reportsSupport LIKE and wildcards in custom queries

comment:2 by Christian Boos, 12 years ago

Component: generalreport system
Keywords: query field added
Milestone: 0.11
Owner: changed from Jonas Borgström to Christian Boos

Related to #548, in particular this comment.

comment:3 by anonymous, 12 years ago

I discovered that you can achieve a "begins with" (and other) component name match already today, using the query language in specially written URLs: simply use a query string part like "…&component=^blah-&…" and you'll have a selection of all tickets whose associated component starts with "blah-". The only catch is, indeed, that the relevant syntax "=^" (and =~, =$, plus the negations) is erroneously documented (cf. http://trac.edgewall.org/wiki/TracQuery) as "^=" (and ~=, $=, …). (Or perhaps the documentation is correct but the implementation isn't.)

So it would seem to be a simple matter of adding a "begins with" entry into the combobox, and have this translate to a "=^" in the generated query string.

comment:4 by Christopher Lenz, 12 years ago

What do you components/milestones/versions look like that you need substring matching as opposed to using simple ORs as are already provided by the UI?

in reply to:  4 comment:5 by anonymous, 12 years ago

Replying to cmlenz:

What do you components/milestones/versions look like that you need substring matching as opposed to using simple ORs as are already provided by the UI?

They look like so: Major1-Minor11, Major1-Minor12, Major1-Minor13, Major2-Minor21, Major2-Minor22, …, Majorx-Minory, … And I would like to custom-query all tickets whose, e.g., associated component begins with "Major2-". As I said above, I can do it via an URL but I cannot do it using the GUI. That alone seems to be a good reason for complementing the current GUI's combobox entries (IMO).

in reply to:  4 ; comment:6 by shansen@…, 11 years ago

Cc: shansen@… added

For the record, I'd find this feature very useful, too.

Replying to cmlenz:

What do you components/milestones/versions look like that you need substring matching as opposed to using simple ORs as are already provided by the UI?

For our part, we use a single Trac instance for more then development tracking. We like keeping them together so they can interact readily when needed— but we'd like to keep them apart in other ways. Naming schemes are helpful in that.

Development milestones are like "Release-4.1.5", "Release-4.1.6", etc. An installation may be "Install-Sitename 4.1 upgrade".

Being able to search on everything for a milestone LIKE "Release-%' would rock. Components do something similar, though to a lesser degree. OR can accomplish the end, but is very cumbersome, especially for milestones. We can go edit all the saved-queries everytime a milestone is created, but its a pain :)

in reply to:  6 comment:7 by Christian Boos, 11 years ago

Milestone: 0.11.20.12

Replying to shansen@advpubtech.com:

Being able to search on everything for a milestone LIKE "Release-%' would rock. Components do something similar, though to a lesser degree. OR can accomplish the end, but is very cumbersome, especially for milestones. We can go edit all the saved-queries everytime a milestone is created, but its a pain :)

One alternative would be to have multiselect fields, like Redmine has {look for the + sign below value listbox). That would at the same time reduce the difficulty to enter more than one value for a given criterion and it would be fast to select all the Release-… entries in one gesture. Note that nothing would change for selecting the first value for a criterion.

comment:8 by osimons, 10 years ago

Cc: osimons added

Related to #5979.

#7258 suggested the alternative of the user in custom query being able to switch the field from select to text as needed, and thereby supporting the full range of 'startswith', 'contains' and so on.

comment:9 by Remy Blank, 9 years ago

Milestone: 0.12next-major-0.1X

comment:10 by Ryan J Ollos, 4 years ago

Owner: Christian Boos removed

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The ticket will remain with no owner.
The ticket will be disowned.
as The resolution will be set.
The owner will be changed from (none) to anonymous.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.