TicketQuery Wiki Macro
The TicketQuery macro lets you display information on tickets within wiki pages. The query language used by the `[TicketQuery]` macro is described in TracQuery page.
Usage
Example
#!th rowspan=2, style="text-align: left;" Details of ticket #1:
#!td style="border-bottom: 0;"
#!td `[[:[TicketQuery(id=1,col=id|owner|reporter,rows=summary,table)]]]`
#!td colspan=2, style="border-top: 0;" [[:[TicketQuery(id=1,col=id|owner|reporter,rows=summary,table)]]]
Using the `[[:[TicketQuery]]]` Macro
The TicketQuery macro lets you display lists of tickets matching certain criteria anywhere you can use WikiFormatting.
Example:
[[:[TicketQuery(version=0.6|0.7&resolution=duplicate)]]]
This is displayed as:
[[:[TicketQuery(version=0.6|0.7&resolution=duplicate)]]]
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 displays the link and description of a single ticket:
[[:[TicketQuery(id=123)]]]
This is displayed as:
[[:[TicketQuery(id=123)]]]
A more compact representation without the ticket summaries is:
[[:TicketQuery(version=0.6|0.7&resolution=duplicate,|compact)]]
This is displayed as:
[[:TicketQuery(version=0.6|0.7&resolution=duplicate,|compact)]]
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:
[[:TicketQuery(version=0.6|0.7&resolution=duplicate,|count)]]
A graphical use of the macro is with the `format=progress` attribute:
[[:[TicketQuery(milestone=0.12.8&group=type,format=progress)]]]
For example for one of the upcoming milestones, bars are shown by ticket type: [TicketQuery(milestone=0.12.8&group=type,format=progress)]
See also: TracQuery, TracTickets, TracReports, TracGuide