Searching for tickets
Searches use solr lucene query syntax. Use the following fields in tracker ticket searches:
- User who owns the ticket - assigned_to
- Labels assigned to the ticket - labels
- Milestone the ticket is assigned to - _milestone
- Last modified date - mod_date_dt
- Body of the ticket - text
- Number of ticket - ticket_num
- User who created the ticket - reported_by
- Status of the ticket - status
- Title of the ticket - summary
- Votes up/down of the ticket - votes_up/votes_down (if enabled in tool options)
- Votes total of the ticket - votes_total
- Imported legacy id - import_id
- Custom field - the field name with an underscore in front, like _custom
Example searches
Any ticket that is not closed in the 1.0 milestone with "foo" in the title
!status:closed AND summary:foo* AND _milestone:1.0
Tickets with the label "foo" but not the label "bar":
labels:foo AND -labels:bar
Tickets assigned to or added by a user with the username "admin1" and the custom field "size" set to 2
(assigned_to_s:admin1 or reported_by_s:admin1) AND _size:2
The ticket has "foo" as the title or the body with a number lower than 50
(summary:foo or text:foo) AND ticket_num:[* TO 50]
Tickets last modified in April 2012
mod_date_dt:[2012-04-01T00:00:00Z TO 2012-04-30T23:59:59Z]
Saving searches
Ticket searches may be saved for later use by project administrators. To save a search, click "Edit Searches" in the tracker sidebar. Click "Add Bin" then enter a summary and search terms for the saved search. Your search will now show up in the sidebar under "Searches" with a count of how many tickets match the query.
Sorting search results
Ticket search results can be sorted by clicking the header of the column you want to sort by. The first click will sort the results in ascending order. Clicking the header again will sort the column in descending order. In addition to sorting by the column headers, you can manually sort on these properties:
- Labels assigned to the ticket - labels_s
- Milestone the ticket is assigned to - _milestone_s
- Last modified date - mod_date_dt
- Body of the ticket - text_s
- Number of ticket - ticket_num_i
- User who created the ticket - reported_by_s
- Status of the ticket - status_s
- Title of the ticket - snippet_s
- Custom field - the field name with an _ in front and _s at the end like _custom_s
You can use these properties by appending them to the url (only one sort allowed at a time) like this:
/p/yourproject/tickets/search/?q=_milestone:1.0&sort=snippet_s+asc