Changes between Version 2 and Version 3 of TicketQuery


Ignore:
Timestamp:
2018-10-05T12:10:06+10:00 (6 years ago)
Author:
trac
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • TicketQuery

    v2 v3  
    11= !TicketQuery Wiki Macro
    22
    3 The !TicketQuery macro lets you display ticket information anywhere that accepts WikiFormatting.
    4 The query language used by the `[[TicketQuery]]` macro is described in the [TracQuery#QueryLanguage TracQuery] page.
     3The !TicketQuery macro lets you display information on tickets within wiki pages.
     4The query language used by the `[[TicketQuery]]` macro is described in [TracQuery#QueryLanguage TracQuery] page.
    55
    66== Usage
     
    88[[MacroList(TicketQuery)]]
    99
    10 == Examples
     10== Example
    1111
    1212||= **Example** =||= **Result** =||= **Macro** =||
     
    4747|| **[[TicketQuery(status=closed,resolution=fixed,count)]]**||\
    4848|| `[[TicketQuery(status=closed,resolution=fixed,count)]]` ||
    49 |-----------------------------------------------------------
    50 ||=Number of untriaged tickets (milestone unset): =||\
    51 || **[[TicketQuery(status!=closed,milestone=,count)]]**||\
    52 || `[[TicketQuery(status!=closed,milestone=,count)]]` ||
    5349|-----------------------------------------------------------
    5450||=Total number of tickets: =||\
     
    106102|-----------------------------------------------------------
    107103
    108 === Format: list
     104== Using the `[[TicketQuery]]` Macro
    109105
     106The [trac:TicketQuery TicketQuery] macro lets you display lists of tickets matching certain criteria anywhere you can use WikiFormatting.
     107
     108Example:
    110109{{{
    111110[[TicketQuery(version=0.6|0.7&resolution=duplicate)]]
     
    115114  [[TicketQuery(version=0.6|0.7&resolution=duplicate)]]
    116115
     116Just 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:
    117117{{{
    118118[[TicketQuery(id=123)]]
     
    122122  [[TicketQuery(id=123)]]
    123123
    124 === Format: compact
    125 
     124A more compact representation without the ticket summaries is:
    126125{{{
    127126[[TicketQuery(version=0.6|0.7&resolution=duplicate, compact)]]
     
    131130  [[TicketQuery(version=0.6|0.7&resolution=duplicate, compact)]]
    132131
    133 === Format: count
    134 
     132If you wish to receive only the number of defects that match the query, use the `count` parameter:
    135133{{{
    136134[[TicketQuery(version=0.6|0.7&resolution=duplicate, count)]]
     
    140138  [[TicketQuery(version=0.6|0.7&resolution=duplicate, count)]]
    141139
    142 === Format: progress
    143 
     140A graphical use of the macro is with the `format=progress` attribute:
    144141{{{
    145142[[TicketQuery(milestone=0.12.8&group=type,format=progress)]]
    146143}}}
    147144
    148 This is displayed as:
    149   [[TicketQuery(milestone=0.12.8&group=type,format=progress)]]
    150 
    151 === Format: table
    152 
    153 You can choose the columns displayed in the table format (`format=table`) using `col=<field>`. You can specify multiple fields and the order they are displayed by placing pipes (`|`) between the columns:
    154 {{{
    155 [[TicketQuery(max=3,status=closed,order=id,desc=1,format=table,col=resolution|summary|owner|reporter)]]
    156 }}}
    157 
    158 This is displayed as:
    159 [[TicketQuery(max=3,status=closed,order=id,desc=1,format=table,col=resolution|summary|owner|reporter)]]
    160 
    161 ==== Full rows
    162 
    163 In ''table'' format you can specify full rows using `rows=<field>`:
    164 {{{
    165 [[TicketQuery(max=3,status=closed,order=id,desc=1,format=table,col=resolution|summary|owner|reporter,rows=description)]]
    166 }}}
    167 
    168 This is displayed as:
    169 [[TicketQuery(max=3,status=closed,order=id,desc=1,format=table,col=resolution|summary|owner|reporter,rows=description)]]
     145For example for one of the upcoming milestones, bars are shown by ticket type:
     146[[TicketQuery(milestone=0.12.8&group=type,format=progress)]]
    170147
    171148----
    172 See also: TracQuery, TracTickets, TracReports
     149See also: TracQuery, TracTickets, TracReports, TracGuide