Changes between Version 9 and Version 10 of TracQuery


Ignore:
Timestamp:
Dec 14, 2014, 5:16:20 PM (9 years ago)
Author:
trac
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • TracQuery

    v9 v10  
    1313 * If not logged and no name/email defined in the preferences then all open issues are displayed.
    1414
    15 Current filters can be removed by clicking the button to the left with the minus sign on the label.  New filters are added from the pulldown lists at the bottom corners of the filters box ('And' conditions on the left, 'Or' conditions on the right).  Filters with either a text box or a pulldown menu of options can be added multiple times to perform an ''or'' of the criteria.
     15Current filters can be removed by clicking the button to the right with the minus sign on the label.  New filters are added from the pulldown lists at the bottom corners of the filters box ('And' conditions on the left, 'Or' conditions on the right).  Filters with either a text box or a pulldown menu of options can be added multiple times to perform an ''or'' of the criteria.
    1616
    1717You can use the fields just below the filters box to group the results based on a field, or display the full description for each ticket.
     
    3232
    3333''Note:'' one way to easily build queries like the ones below, you can build and test the queries in the Custom report module and when ready - click ''Save query''. This will build the query string for you. All you need to do is remove the extra line breaks.
    34 
    35 ''Note:'' you must have the '''REPORT_CREATE''' permission in order to save queries to the list of default reports. The ''Save query'' button will only appear if you are logged in as a user that has been granted this permission. If your account does not have permission to create reports, you can still use the methods below to save a query.
    36 
    3734
    3835=== Using TracLinks ===
     
    6865  [[TicketQuery(version=0.6|0.7&resolution=duplicate)]]
    6966
    70 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 allows displaying the link and description of a single ticket:
    71 {{{
    72 [[TicketQuery(id=123)]]
    73 }}}
    74 
    75 This is displayed as:
    76   [[TicketQuery(id=123)]]
     67Just 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].
    7768
    7869A more compact representation without the ticket summaries is also available:
     
    8475  [[TicketQuery(version=0.6|0.7&resolution=duplicate, compact)]]
    8576
    86 Finally, if you wish to receive only the number of defects that match the query, use the ``count`` parameter.
     77Finally if you wish to receive only the number of defects that match the query using the ``count`` parameter.
    8778
    8879{{{
     
    116107=== Query Language ===
    117108
    118 `query:` TracLinks and the `[[TicketQuery]]` macro both use a mini “query language” for specifying query filters. Basically, the filters are separated by ampersands (`&`). Each filter then consists of the ticket field name, an operator, and one or more values. More than one value are separated by a pipe (`|`), meaning that the filter matches any of the values. To include a literal `&` or `|` in a value, escape the character with a backslash (`\`).
     109`query:` TracLinks and the `[[TicketQuery]]` macro both use a mini “query language” for specifying query filters. Basically, the filters are separated by ampersands (`&`). Each filter then consists of the ticket field name, an operator, and one or more values. More than one value are separated by a pipe (`|`), meaning that the filter matches any of the values. To include a litteral `&` or `|` in a value, escape the character with a backslash (`\`).
    119110
    120111The available operators are:
    121 || '''`=`''' || the field content exactly matches one of the values ||
     112|| '''`=`''' || the field content exactly matches the one of the values ||
    122113|| '''`~=`''' || the field content contains one or more of the values ||
    123114|| '''`^=`''' || the field content starts with one of the values ||