Changes between Version 3 and Version 4 of TracQuery


Ignore:
Timestamp:
Apr 28, 2017, 12:06:12 AM (5 years ago)
Author:
trac
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • TracQuery

    v3 v4  
    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 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.
     15Current 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.
    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
    3437
    3538=== Using TracLinks ===
     
    6568  [[TicketQuery(version=0.6|0.7&resolution=duplicate)]]
    6669
    67 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].
     70Just 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
     75This is displayed as:
     76  [[TicketQuery(id=123)]]
    6877
    6978A more compact representation without the ticket summaries is also available:
     
    7584  [[TicketQuery(version=0.6|0.7&resolution=duplicate, compact)]]
    7685
    77 Finally if you wish to receive only the number of defects that match the query using the ``count`` parameter.
     86Finally, if you wish to receive only the number of defects that match the query, use the `count` parameter.
    7887
    7988{{{
     
    107116=== Query Language ===
    108117
    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 (`\`).
     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 (`\`).
    110119
    111120The available operators are:
    112 || '''`=`''' || the field content exactly matches the one of the values ||
     121|| '''`=`''' || the field content exactly matches one of the values ||
    113122|| '''`~=`''' || the field content contains one or more of the values ||
    114123|| '''`^=`''' || the field content starts with one of the values ||