TicketQuery - ACCESS-NRI/accessdev-Trac-archive GitHub Wiki
TicketQuery Wiki Macro
The TicketQuery macro lets you display information on tickets within wiki pages.
The query language used by the [TicketQuery](/ACCESS-NRI/accessdev-Trac-archive/wiki/TicketQuery)
macro is described in [TracQuery#UsingtheTicketQueryMacro TracQuery] page.
Usage
Example
# Example | # Result | # Macro |
---|---|---|
----------------------------------------------------------- | ||
=Number of [query:status=new&milestone# Triage tickets]: | \ | |
--- | --- | |
TicketQuery(status=new&milestone=,count) | \ | |
[TicketQuery(status=new&milestone=,count)](/ACCESS-NRI/accessdev-Trac-archive/wiki/TicketQuery(status=new&milestone=,count)) |
||
----------------------------------------------------------- | ||
=Number of new tickets: = | \ | |
--- | --- | |
TicketQuery(status=new,count) | \ | |
[TicketQuery(status=new,count)](/ACCESS-NRI/accessdev-Trac-archive/wiki/TicketQuery(status=new,count)) |
||
----------------------------------------------------------- | ||
=Number of reopened tickets: = | \ | |
--- | --- | |
TicketQuery(status=reopened,count) | \ | |
[TicketQuery(status=reopened,count)](/ACCESS-NRI/accessdev-Trac-archive/wiki/TicketQuery(status=reopened,count)) |
||
----------------------------------------------------------- | ||
=Number of assigned tickets: = | \ | |
--- | --- | |
TicketQuery(status=assigned,count) | \ | |
[TicketQuery(status=assigned,count)](/ACCESS-NRI/accessdev-Trac-archive/wiki/TicketQuery(status=assigned,count)) |
||
----------------------------------------------------------- | ||
=Number of invalid tickets: = | \ | |
--- | --- | |
TicketQuery(status=closed,resolution=invalid,count) | \ | |
[TicketQuery(status=closed,resolution=invalid,count)](/ACCESS-NRI/accessdev-Trac-archive/wiki/TicketQuery(status=closed,resolution=invalid,count)) |
||
----------------------------------------------------------- | ||
=Number of worksforme tickets: = | \ | |
--- | --- | |
TicketQuery(status=closed,resolution=worksforme,count) | \ | |
[TicketQuery(status=closed,resolution=worksforme,count)](/ACCESS-NRI/accessdev-Trac-archive/wiki/TicketQuery(status=closed,resolution=worksforme,count)) |
||
----------------------------------------------------------- | ||
=Number of duplicate tickets: = | \ | |
--- | --- | |
TicketQuery(status=closed,resolution=duplicate,count) | \ | |
[TicketQuery(status=closed,resolution=duplicate,count)](/ACCESS-NRI/accessdev-Trac-archive/wiki/TicketQuery(status=closed,resolution=duplicate,count)) |
||
----------------------------------------------------------- | ||
=Number of wontfix tickets: = | \ | |
--- | --- | |
TicketQuery(status=closed,resolution=wontfix,count) | \ | |
[TicketQuery(status=closed,resolution=wontfix,count)](/ACCESS-NRI/accessdev-Trac-archive/wiki/TicketQuery(status=closed,resolution=wontfix,count)) |
||
----------------------------------------------------------- | ||
=Number of fixed tickets: = | \ | |
--- | --- | |
TicketQuery(status=closed,resolution=fixed,count) | \ | |
[TicketQuery(status=closed,resolution=fixed,count)](/ACCESS-NRI/accessdev-Trac-archive/wiki/TicketQuery(status=closed,resolution=fixed,count)) |
||
----------------------------------------------------------- | ||
=Total number of tickets: = | \ | |
--- | --- | |
TicketQuery(count) | \ | |
[TicketQuery(count)](/ACCESS-NRI/accessdev-Trac-archive/wiki/TicketQuery(count)) |
||
----------------------------------------------------------- | ||
=Number of tickets reported or owned by current user: = | \ | |
--- | --- | |
TicketQuery(reporter=$USER,or,owner=$USER,count) | \ | |
[TicketQuery(reporter=$USER,or,owner=$USER,count)](/ACCESS-NRI/accessdev-Trac-archive/wiki/TicketQuery(reporter=$USER,or,owner=$USER,count)) |
||
----------------------------------------------------------- | ||
=Number of tickets created this month: = | \ | |
--- | --- | |
TicketQuery(created=thismonth..,count) | \ | |
[TicketQuery(created=thismonth..,count)](/ACCESS-NRI/accessdev-Trac-archive/wiki/TicketQuery(created=thismonth..,count)) |
||
----------------------------------------------------------- | ||
=Last 3 modified tickets: = | \ | |
--- | --- | |
TicketQuery(max=3,order=modified,desc=1,compact) | \ | |
[TicketQuery(max=3,order=modified,desc=1,compact)](/ACCESS-NRI/accessdev-Trac-archive/wiki/TicketQuery(max=3,order=modified,desc=1,compact)) |
||
----------------------------------------------------------- |
Details of ticket #1:
]}
```td
`[TicketQuery(id=1,col=id](/ACCESS-NRI/accessdev-Trac-archive/wiki/owner|reporter,rows=summary,table))`
|-
[TicketQuery(id=1,col=id](/ACCESS-NRI/accessdev-Trac-archive/wiki/owner|reporter,rows=summary,table))
|-----------------------------------------------------------
[TicketQuery](/ACCESS-NRI/accessdev-Trac-archive/wiki/TicketQuery)
Macro
Using the The [trac:TicketQuery TicketQuery] macro lets you display lists of tickets matching certain criteria anywhere you can use WikiFormatting.
Example: [{ TicketQuery(version=0.6)
This is displayed as:
[TicketQuery(version=0.6](/ACCESS-NRI/accessdev-Trac-archive/wiki/0.7&resolution=duplicate))
Just like the [query: wiki links](https://github.com/ACCESS-NRI/accessdev-Trac-archive/wiki/TracQuery#using-trac-links), the parameter of this macro expects a query string formatted according to the rules of the simple [ticket query language](https://github.com/ACCESS-NRI/accessdev-Trac-archive/wiki/TracQuery#query-language). This also displays the link and description of a single ticket:
This is displayed as:
[TicketQuery(id=123)](/ACCESS-NRI/accessdev-Trac-archive/wiki/TicketQuery(id=123))
A more compact representation without the ticket summaries is:
This is displayed as:
[TicketQuery(version=0.6](/ACCESS-NRI/accessdev-Trac-archive/wiki/0.7&resolution=duplicate,-compact))
If you wish to receive only the number of defects that match the query, use the `count` parameter:
This is displayed as:
[TicketQuery(version=0.6](/ACCESS-NRI/accessdev-Trac-archive/wiki/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)](/ACCESS-NRI/accessdev-Trac-archive/wiki/TicketQuery(milestone=0.12.8&group=type,format=progress))
----
See also: [TracQuery](https://github.com/ACCESS-NRI/accessdev-Trac-archive/wiki/TracQuery), [TracTickets](https://github.com/ACCESS-NRI/accessdev-Trac-archive/wiki/TracTickets), [TracReports](https://github.com/ACCESS-NRI/accessdev-Trac-archive/wiki/TracReports), [TracGuide](https://github.com/ACCESS-NRI/accessdev-Trac-archive/wiki/TracGuide)