Worklog Query Language (WQL)
Rich Filters::Time Tracking Dashboards is an extension of the Rich Filters for Jira Dashboards app.Â
Rich Filters::Time Tracking Dashboards allows you to build structured work log queries using the Worklog Query Language (WQL). The work log queries are embedded in JQL through the rfWorklogs custom field, which is automatically added by the app. When used in rich filters and rich filter gadgets, JQL queries containing work log queries will filter the issues and their work logs based on work log attributes. The results can then be aggregated by issue values (issue count, issue numeric custom fields, issue time tracking fields) or work log values (Worklog Time Spent).
The WQL queries are always embedded in JQL through the rfWorklogs custom field, and they follow either the operator '~
' (CONTAINS) or '~!
' (DOES NOT CONTAIN). The JQL query:Â
rfWorklogs ~ "WQL query"
returns:
when used to aggregate issue values (issue count or issue value fields) or when used in Jira's issue navigator – all the issues containing at least one work log satisfying the WQL query
when used to aggregate work log values (Worklog Time Spent) – all the work logs (belonging to the above issues) satisfying the WQL query
On this page:
Constructing WQL queries
The WQL syntax is very similar to the JQL syntax. A simple query in WQL (also known as a 'clause') consists of a work log attribute, followed by an operator, followed by one or more values or functions. For example:
rfWorklogs ~ "author = abrown"
The query uses the 'author
' work log attribute, the EQUALS operator, and the value 'abrown
'. This query will find all issues having work logged (at least one work log) by the user 'abrown
'. Or from a functional point of view, we would say, all the issues on which 'abrown
' has worked. The same query, when used to aggregate work log values, will return only the work logs having 'abrown
' as author.
A more complex query might look like this:
This query will find all the issues having work logged (at least one work log) by the user 'abrown
' since September 1st, 2018, inclusive. From a functional point of view, we would say, all the issues on which 'abrown
' has worked since September 1st, 2018. When used to aggregate work log values, the same query will return only the work logs containing work performed by 'abrown
' since September 1st, 2018.
Setting the precedence of operators in WQL queries
You can use parentheses in complex WQL statements to enforce the precedence of operators. For example, the JQL query
returns the issues containing at least one work log and the work logs from the author 'abrown
' containing work started before or after August 2018 (in other words, it excludes August 2018).
Note that if you do not use parentheses, the AND
 operator takes precedence over the OR
 operator.Â
Supported work log attributes and operators
WQL supports the following work log attributes and operators:
Attribute Type | Work Log Attributes | Supported Operators | Values / Supported Functions | Examples |
---|---|---|---|---|
User |
|
|
|
|
Date time |
|
|
|
|
Duration |
|
|
|
|
Text |
|
| Text searches need to be surrounded by quote-marks (single or double). See the Quote-marks in WQL note below. |
|
Flag |
|
|
|
|