Opened 17 years ago
Last modified 5 years ago
#5526 new enhancement
Support LIKE and wildcards in custom queries
Reported by: | 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: | |||
Internal 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 (12)
comment:1 by , 17 years ago
Summary: | Support LIKE and wildcards in custom reports → Support LIKE and wildcards in custom queries |
---|
comment:2 by , 17 years ago
Component: | general → report system |
---|---|
Keywords: | query field added |
Milestone: | → 0.11 |
Owner: | changed from | to
comment:3 by , 17 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.
follow-ups: 5 6 comment:4 by , 17 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?
comment:5 by , 17 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).
follow-up: 7 comment:6 by , 17 years ago
Cc: | 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 :)
comment:7 by , 16 years ago
Milestone: | 0.11.2 → 0.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 , 16 years ago
Cc: | added |
---|
comment:9 by , 15 years ago
Milestone: | 0.12 → next-major-0.1X |
---|
comment:10 by , 10 years ago
Owner: | removed |
---|
comment:12 by , 5 years ago
More possible duplicates: #1901, #13089. The latter has a PoC implementation.
Workaround: query:component~=plugin
Related to #548, in particular this comment.