| 80 | == Using the `[[TicketQuery]]` Macro |
| 81 | |
| 82 | The [trac:TicketQuery TicketQuery] macro lets you display lists of tickets matching certain criteria anywhere you can use WikiFormatting. |
| 83 | |
| 84 | Example: |
| 85 | {{{ |
| 86 | [[TicketQuery(version=0.6|0.7&resolution=duplicate)]] |
| 87 | }}} |
| 88 | |
| 89 | This is displayed as: |
| 90 | [[TicketQuery(version=0.6|0.7&resolution=duplicate)]] |
| 91 | |
| 92 | Just like the [wiki:TracQuery#UsingTracLinks query: wiki links], the parameter of this macro expects a query string formatted according to the rules of the simple [wiki:TracQuery#QueryLanguage ticket query language]. This also displays the link and description of a single ticket: |
| 93 | {{{ |
| 94 | [[TicketQuery(id=123)]] |
| 95 | }}} |
| 96 | |
| 97 | This is displayed as: |
| 98 | [[TicketQuery(id=123)]] |
| 99 | |
| 100 | A more compact representation without the ticket summaries is: |
| 101 | {{{ |
| 102 | [[TicketQuery(version=0.6|0.7&resolution=duplicate, compact)]] |
| 103 | }}} |
| 104 | |
| 105 | This is displayed as: |
| 106 | [[TicketQuery(version=0.6|0.7&resolution=duplicate, compact)]] |
| 107 | |
| 108 | Finally, if you wish to receive only the number of defects that match the query, use the `count` parameter: |
| 109 | {{{ |
| 110 | [[TicketQuery(version=0.6|0.7&resolution=duplicate, count)]] |
| 111 | }}} |
| 112 | |
| 113 | This is displayed as: |
| 114 | [[TicketQuery(version=0.6|0.7&resolution=duplicate, count)]] |