Edgewall Software

Changes between Version 1 and Version 2 of 0.13/TicketQuery


Ignore:
Timestamp:
Dec 7, 2011, 10:35:03 PM (12 years ago)
Author:
Remy Blank
Comment:

Restored changes by AdrianFritz (#10487).

Legend:

Unmodified
Added
Removed
Modified
  • 0.13/TicketQuery

    v1 v2  
    11= !TicketQuery Wiki Macro =
    2 The query language used by the `[[TicketQuery]]` macro is described in [TracQuery#UsingtheTicketQueryMacro TracQuery] page.
    32
    4 == Usage ==
    5 [[MacroList(TicketQuery)]]
     3TicketQuery macro lets you display lists of tickets matching certain criteria anywhere you can use WikiFormatting.
     4
     5This macro accepts a comma-separated list of keyed parameters, in the form "key=value", and can be used as follows:
     6
     7 `[[TicketQuery([key=value][,key=value][,key=value]...)]]`
     8
     9If the key is the name of a ticket field, the value must use the syntax of a filter specifier as defined in TracQuery#QueryLanguage.
     10 * Note that this is not the same as the simplified URL syntax used for query: links starting with a ? character.
     11 * Commas (,) can be included in field values by escaping them with a backslash (\).
     12
     13The date keys created and modified can also constrain the criteria. Again, see TracQuery#QueryLanguage.
     14
     15In addition to filters, several other named parameters can be used to control how the results are presented. All of them are optional.
     16
     17The date keys `created` and `modified` can also constrain the criteria. Again, see TracQuery#QueryLanguage.
     18
     19In addition to filters, several other named parameters can be used to control how the results are presented. All of them are optional.
    620
    721
     22||='''Key'''||='''Description & Details'''||='''Default'''||
     23||=`col`=|| Pipe-separated list of columns and its order to show (requires `format=table`). || `col=id|summary`[[BR]]`|owner|type|`[[BR]]`status|priority`[[BR]]`|milestone` ||
     24||=`desc`=|| Reverse (`true`) the natural display order of the tickets. || `desc=false` ||
     25||=`format`^1^=|| Sets how to display the list of tickets:[[BR]] * `list` -- ticket `id` next to the `summary`, each ticket on a separate line.[[BR]] * `compact` -- comma-separated list of ticket `id`s.[[BR]] * `count` -- the count of matching tickets[[BR]] * `table` -- similar to the custom query view (but without the controls)[[BR]] * `progress` -- a view similar to the milestone progress bars. || `format=list` ||
     26||=`group`=|| Sets the ticket field for grouping tickets. || `None` ||
     27||=`groupdesc`=|| Reverse (`true`) the natural display order of the groups. || `groupdesc=false` ||
     28||=`max`=|| Sets the limit number of tickets to display (`max=0` means no maximum). || `max=0` ||
     29||=`order`=|| Sets the ticket field for ordering tickets. || `order=id` ||
     30||=`rows`=|| Pipe-separated list of ticket fields to be viewed as a row, e.g. rows=description|summary (requires `format=table`)        || `None` ||
     31||=`verbose`=||Get the description for the listed tickets (`true`). Use with format=table only. Deprecated (< 0.12) in favor of the rows key. || `verbose=false` ||
     32
     33 Note ^1^ :: For compatibility with Trac 0.10, if there's a last positional parameter given to the macro, it will be used to specify the format.
     34 Note:: Also, for compatibility with Trac 0.10, using "&" as a field separator still works (except for order) but is deprecated.
    835
    936== Example ==
    1037
    11 
    12  * Number of [query:status=new&milestone= Triage tickets]: [[TicketQuery(status=new&milestone=, count)]]
    13  * Number of new tickets: [[TicketQuery(status=new, count)]]
    14  * Number of reopened tickets: [[TicketQuery(status=reopened, count)]]
    15  * Number of assigned tickets: [[TicketQuery(status=assigned, count)]]
    16  * Number of invalid tickets: [[TicketQuery(status=closed&resolution=invalid, count)]]
    17  * Number of worksforme tickets: [[TicketQuery(status=closed&resolution=worksforme, count)]]
    18  * Number of duplicate tickets: [[TicketQuery(status=closed&resolution=duplicate, count)]]
    19  * Number of wontfix tickets: [[TicketQuery(status=closed&resolution=wontfix, count)]]
    20  * Number of fixed tickets: [[TicketQuery(status=closed&resolution=fixed, count)]]
    21  * Total number of tickets in Trac is [[TicketQuery(status=new|assigned|reopened|closed, count)]]
    22 
     38 * Number of [query:status=new&milestone= Triage tickets]: '''[[TicketQuery(status=new&milestone=, count)]]'''
     39   * got with `[[TicketQuery(status=new&milestone=, count)]]`
     40 * Number of new tickets: '''[[TicketQuery(status=new, count)]]'''
     41   * got with `[[TicketQuery(status=new, count)]]`
     42 * Number of reopened tickets: '''[[TicketQuery(status=reopened, count)]]'''
     43   * got with `[[TicketQuery(status=reopened, count)]]`
     44 * Number of assigned tickets: '''[[TicketQuery(status=assigned, count)]]'''
     45   * got with `[[TicketQuery(status=assigned, count)]]`
     46 * Number of invalid tickets: '''[[TicketQuery(status=closed&resolution=invalid, count)]]'''
     47   * got with `[[TicketQuery(status=closed&resolution=invalid, count)]]`
     48 * Number of worksforme tickets: '''[[TicketQuery(status=closed&resolution=worksforme, count)]]'''
     49   * got with  `[[TicketQuery(status=closed&resolution=worksforme, count)]]`
     50 * Number of duplicate tickets: '''[[TicketQuery(status=closed&resolution=duplicate, count)]]'''
     51   * got with `[[TicketQuery(status=closed&resolution=duplicate, count)]]`
     52 * Number of wontfix tickets: '''[[TicketQuery(status=closed&resolution=wontfix, count)]]'''
     53   * got with `[[TicketQuery(status=closed&resolution=wontfix, count)]]`
     54 * Number of fixed tickets: '''[[TicketQuery(status=closed&resolution=fixed, count)]]'''
     55   * got with `[[TicketQuery(status=closed&resolution=fixed, count)]]`
     56 * Total number of tickets in Trac is '''[[TicketQuery(status=new|assigned|reopened|closed, count)]]'''
     57   * got with `[[TicketQuery(status=new|assigned|reopened|closed, count)]]`
     58 * The last 5 modified tickets in Trac are: '''[[TicketQuery(max=5,modified=lastmonth..thismonth, ,desc=1,format=compact)]]''' and the very last one is detailed below:[[TicketQuery(max=1,modified=lastmonth..thismonth, ,desc=1,format=table,col=resolution|owner|reporter,rows=summary)]]
     59   * got with `[[TicketQuery(max=1,modified=lastmonth..thismonth, ,desc=1,format=table,col=resolution|owner|reporter,rows=summary)]]`
    2360
    2461----