Advertisement
Tag Archives: search

Searching for tickets

Note: This article refers to projects on the new SourceForge platform. You should upgrade if you haven’t already.

If you’re searching your project’s tracker for a ticket, you have a single text field in which to enter your search, and you may be unaware of the rich syntax that’s available for crafting searches.

For the full details, click the “Help” button on any search results page:

Screen Shot 2013-02-08 at 3.25.47 PM

But the purpose of this blog post is to show you a few simple examples so that you’re aware of what’s possible.

First, if you just enter a keyword, you’re searching for that word in the title or description of a ticket. While that may be sufficient if you only have a few tickets, it quickly becomes unmanageable.

The next thing you need to know is what fields you can investigate. Here’s the complete list:

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

Any field can be included in a search query. So if you wanted to search for tickets about ‘fishing’ that aren’t closed, you can do:

summary:fishing AND !status:closed

You can combine more complex searches by using parentheses:

summary:export AND !(status:closed OR status:wont-fix)

If you use labels (aka tags) on all of your tickets, this can also be a great way to find the tickets that you want:

labels:community AND (status:open OR status:in-progress)

If you want to know what your project worked on in a particular week, you can use a mod_date_dt search to look for tickets that were modified in that time range:

mod_date_dt:[2013-02-04T00:00:00Z TO 2013-02-08T23:59:59Z]

Finally, if you use a particular search a lot, you can save it for later use. Click on “Edit Searches” in the left sidebar, and then “Add Bin” at the bottom of that page. Give it a name, and put your search terms into the ‘Terms’ field.

There’s more you can do with searches. As I mentioned above, click the ‘Help’ button for the docs. For the exhaustive docs, see the Lucene query syntax tutorial on SolrTutorial.com.