Trac Ticket Queries

In addition to reports, Trac provides support for custom ticket queries, used to display lists of tickets meeting a specified set of criteria.

To configure and execute a custom query, switch to the View Tickets module from the navigation bar, and select the Custom Query link.


When you first go to the query page the default filter will display tickets relevant to you:

  • If logged in then all open tickets it will display open tickets assigned to you.
  • If not logged in but you have specified a name or email address in the preferences then it will display all open tickets where your email (or name if email not defined) is in the CC list.
  • If not logged and no name/email defined in the preferences then all open issues are displayed.

Current filters can be removed by clicking the button to the left with the minus sign on the label. New filters are added from the pulldown lists at the bottom corners of the filters box ('And' conditions on the left, 'Or' conditions on the right). Filters with either a text box or a pulldown menu of options can be added multiple times to perform an or of the criteria.

You can use the fields just below the filters box to group the results based on a field, or display the full description for each ticket.

Once you've edited your filters click the Update button to refresh your results.

Clicking on one of the query results will take you to that ticket. You can navigate through the results by clicking the Next Ticket or Previous Ticket links just below the main menu bar, or click the Back to Query link to return to the query page.

You can safely edit any of the tickets and continue to navigate through the results using the Next/Previous/Back to Query links after saving your results. When you return to the query any tickets which were edited will be displayed with italicized text. If one of the tickets was edited such that it no longer matches the query criteria the text will also be greyed. Lastly, if a new ticket matching the query criteria has been created, it will be shown in bold.

The query results can be refreshed and cleared of these status indicators by clicking the Update button again.

Saving Queries

Trac allows you to save the query as a named query accessible from the reports module. To save a query ensure that you have Updated the view and then click the Save query button displayed beneath the results. You can also save references to queries in Wiki content, as described below.

Note: one way to easily build queries like the ones below, you can build and test the queries in the Custom report module and when ready - click Save query. This will build the query string for you. All you need to do is remove the extra line breaks.

Note: you must have the REPORT_CREATE permission in order to save queries to the list of default reports. The Save query button will only appear if you are logged in as a user that has been granted this permission. If your account does not have permission to create reports, you can still use the methods below to save a query.

You may want to save some queries so that you can come back to them later. You can do this by making a link to the query from any Wiki page.

[query:status=new|assigned|reopened&version=1.0 Active tickets against 1.0]

Which is displayed as:

Active tickets against 1.0

This uses a very simple query language to specify the criteria (see Query Language).

Alternatively, you can copy the query string of a query and paste that into the Wiki link, including the leading ? character:

[query:?status=new&status=assigned&status=reopened&group=owner Assigned tickets by owner]

Which is displayed as:

Assigned tickets by owner

Using the [[TicketQuery]] Macro

The TicketQuery macro lets you display lists of tickets matching certain criteria anywhere you can use WikiFormatting.



This is displayed as:

remove profile picture, links from left column on index page
Main page with static parts, wrong image link etc.
Inconsistencies in page layout, especially number of columns
[test] signup.php sql error
Move old BW-mainpage to application "Rox"
Signup page - Improve handling of invalid user input
Members per Country don't appear on Algeria
Spam protection for Trac
Signup problem
mailbox broken when you have 21 messages
you can easily write positive comments without meeting the person you write about
Port member-pages to platformPT (members.php,editmyprofile.php,comments.php,mypreferences.php,...)
Create Gmail-like Ajax-chat for our whole website
location selector query logic
MySQL error and code showing in forum
Multiple Popup in Volunteers board
short generic URLs e.g.
Login redirect on and in Firefox and Internet Explorer
Lost password page should send a link to change the password
Signup process : "why not check password with JS ?"
Replace the flags in the footer by spelled names for language selection
support for left to right languages (Hebrew, Arabic)
bw forum search function
translation tool
bug report - images not displaying correctly
Broken profiles on ALPHA
logged out while writing forum posts
bug report
bug report
can't read msgs
cannot delete pictures from gallery
Allow for creating group admins
Create group relationships feature
bug report - display age
bug report
"View forum posts" broken on profiles
Email: tab "sent" Information about user is not correct
bug report
When you start a new topic from the group overview page, they are not connected to the group
Provide a way for the treasurer of BeWelcome to add manually description for new donation
comments - wrong time stamp
HTML tags are displayed in notification
Accommodation setting at member search result
"add a note" function
page after login: profile picture / empty pic - encouragement to upload photo
my notes functionality is messy
map search - members cant be found
Bug report : number of members
Users from small towns don't appear on the map
Description for relations not shown.
Make postal code optional
Editing of a group post disconnect it from its group.
change group admin / groupsettings
unexpected "New topic" button for the groups I don't belong
broken "Add a note" function
buttons break in some languages
Display the number of unread messages on the my messages icon
Tags and Visibility changes to existing Thread have no effect
"Reply" button disappears on forum pages when zooming in and out in Chrome
Forums should not be visible if not logged in
one member can't change his profile summary
Better notification for new messages
Wrong text on blogs headers
show recent comments
Spurious 'member' in all search results
update Khyber Pakhtunkhwa wrong region name
Include successor states of Nethelands Antilles in list of countries
Separate overview for forum and group threads
Remove editing option for tags
Privacy setting for trips do not work at all
profile translation disappeared
String ActivityJoinTheFun is misleading
Next visitors should show visitors in a wider area
Two word codes can have exact same name
Improve AdminFAQ
permalinks don't work when thread is more than 1 page long.
Visibility of threads in a group
Don't send messages when a translation is added
failing migrations on the developer database dump

Just like the query: wiki links, the parameter of this macro expects a query string formatted according to the rules of the simple ticket query language. This also allows displaying the link and description of a single ticket:


This is displayed as:

Blog and other Apps of TB produce XML-parsingerror-pages

A more compact representation without the ticket summaries is also available:

[[TicketQuery(version=0.6|0.7&resolution=duplicate, compact)]]

This is displayed as:

#8, #57, #74, #75, #82, #85, #105, #176, #186, #201, #237, #257, #295, #297, #317, #343, #429, #447, #456, #497, #518, #608, #610, #612, #634, #662, #680, #681, #698, #851, #1109, #1111, #1152, #1157, #1168, #1177, #1186, #1197, #1217, #1265, #1266, #1269, #1280, #1290, #1310, #1424, #1429, #1436, #1480, #1531, #1553, #1556, #1561, #1603, #1605, #1606, #1609, #1706, #1735, #1749, #1762, #1792, #1817, #1826, #1831, #1841, #1937, #1943, #1969, #1971, #1977, #2005, #2014, #2071, #2140, #2156, #2161, #2193, #2197, #2283

Finally, if you wish to receive only the number of defects that match the query, use the count parameter.

[[TicketQuery(version=0.6|0.7&resolution=duplicate, count)]]

This is displayed as:


Customizing the table format

You can also customize the columns displayed in the table format (format=table) by using col=<field> - you can specify multiple fields and what order they are displayed by placing pipes (|) between the columns like below:


This is displayed as:

Results (1 - 3 of 1586)

1 2 3 4 5 6 7 8 9 10 11
Ticket Resolution Summary Owner Reporter
#2283 duplicate failing migrations on the developer database dump lantti
#2275 invalid Fast Systems Of Linux VPS - The Best Routes SamaraBothwell
#2269 worksforme Footer in the middle of comment page railslide railslide
1 2 3 4 5 6 7 8 9 10 11

Full rows

In table format you can also have full rows by using rows=<field> like below:


This is displayed as:

Results (1 - 3 of 1586)

1 2 3 4 5 6 7 8 9 10 11
Ticket Resolution Summary Owner Reporter
#2283 duplicate failing migrations on the developer database dump lantti

Some of the wordcodes that should be added by running migrations are already present in the words.sql database dump. This causes the migrations to fail. The workaround that I used to continue with my install was replacing the INSERT INTO queries in the tools/roxmigration/roxmigration.php/_writeWordCodeToDb() function with REPLACE INTO queries. This way the query succeeds even if there is already an identical wordcode in the database.

Should we make this change to the official code too? Is there a reason why we would like to have a fatal error instead of silent replacement in such a conflict between the existing wordcode and a migration? Or would it be better to fix the developer db dump instead?

#2275 invalid Fast Systems Of Linux VPS - The Best Routes SamaraBothwell

Windows VPS Vs Linux VPS

There are many decisions to make for hosting right this moment for your rising amount of people and corporation who need a web property. You'll uncover quite a few hosting choices that happen to be wonderful for numerous web-site specifications. Web-site entrepreneurs who experience additional than normal website visitors on their own web-sites normally choose Linux and Windows VPS hosting with regards to demands. It includes a larger bandwidth and disk capacity which could deal with the surge of activity these kinds of websites enjoy. It is additionally perfect for net builders with quite unique programming adjustments for his or her personal developments.

Any vps hosting operates by partitioning a particular hosting server right into several servers collectively with aid of virtual application together with microcomputers. These kind of virtual dedicated server hosting can be a mediated journey between shared enviroment together with devoted servers related to web hosting service, offering their possible clients self-reliance as effectively finding a lot significantly less than hosting.

Hence, virtual dedicated server hosting is usually deemed an excellent bridge between dedicated and shared enviroment system. A large number of hosting customers prefer Linux vps over other kinds of hosting today because doing so provides them with with greater control in contrast to shared enviroment. Even when companies work well from the shared enviroment system and do not want the extra resources offered inside vps hosting system, the more control may be worth the additional expense. Windows vps is an excellent starter package for anyone companies which use dedicated server hosting, but they are cautious about the technological difficulties linked to it.Like with other hosting, vps hosting also holds many perks. In contrast to a separate server hosting system, Linux vps might turn out to be cheaper to people and businesses. Secondly, the plans of vps might be customized to fulfill the requirements people. This means that men and women pay only for they can be using which enables it to get rid of the features they just don't need. In addition, the majority of the virtual dedicated server hosting plans is scalable.

Selecting the best hosting company for Linux VPS can be a decision that you will must invest a while in. If you are searching for reliability then Linux could be a great solution for you personally since Windows doesn't provide 100% uptime. Just because web site hosting, VPS hosting provides flexibility, better control and functionality in the highly secured manner as well as resource sharing.

1 particular gets bogged together with the above offered individual computer programs program lingo and will get disappointed through specifics of thinking about hosting and virtual private portion web hosting service in addition to windows committed servers. It could be significantly much easier to view the thought of getting some sort of vps hosting through the pursuing explanation. It's in simple terms an easy method of linking several desktops to merely 1 single mom laptop or computer. Through this process distinct users will sustain unbiased records regarding the main individual computer even although implementing the respective computer system systems with the significant pc program. They will all utilize identical webpage link all of which access the exact same principal computer nonetheless without getting interfering or maybe any info around the other recent users.

#2269 worksforme Footer in the middle of comment page railslide railslide

The footer doesn't stick to the bottom of comment page (e.g., covering part of the form and making impossible to leave a comment for another member.

1 2 3 4 5 6 7 8 9 10 11

Query Language

query: TracLinks and the [[TicketQuery]] macro both use a mini “query language” for specifying query filters. Basically, the filters are separated by ampersands (&). Each filter then consists of the ticket field name, an operator, and one or more values. More than one value are separated by a pipe (|), meaning that the filter matches any of the values. To include a literal & or | in a value, escape the character with a backslash (\).

The available operators are:

= the field content exactly matches one of the values
~= the field content contains one or more of the values
^= the field content starts with one of the values
$= the field content ends with one of the values

All of these operators can also be negated:

!= the field content matches none of the values
!~= the field content does not contain any of the values
!^= the field content does not start with any of the values
!$= the field content does not end with any of the values

The date fields created and modified can be constrained by using the = operator and specifying a value containing two dates separated by two dots (..). Either end of the date range can be left empty, meaning that the corresponding end of the range is open. The date parser understands a few natural date specifications like "3 weeks ago", "last month" and "now", as well as Bugzilla-style date specifications like "1d", "2w", "3m" or "4y" for 1 day, 2 weeks, 3 months and 4 years, respectively. Spaces in date specifications can be left out to avoid having to quote the query string.

created=2007-01-01..2008-01-01 query tickets created in 2007
created=lastmonth..thismonth query tickets created during the previous month
modified=1weekago.. query tickets that have been modified in the last week
modified=..30daysago query tickets that have been inactive for the last 30 days

See also: TracTickets, TracReports, TracGuide

Last modified 4 years ago Last modified on Jul 27, 2014, 9:54:49 PM