Document toolboxDocument toolbox

(8.7.7) PQL functions

In this section, you will find our PQL functions. A function performs a calculation on specific Jira data such as the current user and many more. These functions may contain one or more explicit values or project fields, that will help you retrieve the information you are looking for in the project navigator, filtering through that specific field or value. Here you can find the list of Projectrak PQL functions:

currentUser()

This function will allow you to search for the projects in which the current logged user is included. This function works with the lead field (Jira native) and with any user fields you can create with Projectrak, and it doesn't matter if it's a single or multiple user picker field. 

Please note, that (currentUser()) will work with both operators: 

IN: will show the Projects where the current user is selected. 

NOT IN: will show you the Project in where the current user is not selected. 

How to use currentUser()

This function, can only be used in the project navigator's advanced search and it will apply both List and Releases view and you can use it with any user type field (including the project lead). You only need to take into account what field you want to filter through and then write it down as a PQL. Here you can find an example:

lead in (currentUser()) ORDER BY assignee ASC

currentDate()

This function allows you to perform searches based on today's date. This function works with any date fields you can create with Projectrak.

Please note, that (currentUser()) will work with both operators: 

will show the Projects where the field value is equal to the current date. 

!= will show the Projects where the field value is not equal to the current date. 

>  will show the Projects where the field value is greater than the current date. 

>=  will show the Projects where the field value is greater and equal to the current date. 

will show the Projects where the field value is less than the current date. 

<= will show the Projects where the field value is less and equal than the current date. 

How to use currentDate()

This function can only be used in the project navigator's advanced search and it will apply to both List and Releases view, and you can use it with any date type field. You only need to take into account what field you want to filter through and then write it down as a PQL. Here you can find an example:

"End date" > currentDate()

Relative dates

Use "w" (weeks), "d" (days), "h" (hours) or "m" (minutes) to specify a date relative to the current time. The default is "m" (minutes). Be sure to use quote-marks ("); if you omit the quote-marks, the number you supply will be interpreted as milliseconds after epoch (1970-1-1).

will show the projects where the field value is equal to the relative date. 

!= will show the projects where the field value is not equal to the relative date. 

>  will show the projects where the field value is greater than the relative date. 

>=  will show the projects where the field value is greater and equal to the relative date. 

will show the projects where the field value is less than the current date the relative date. 

<= will show the projects where the field value is less and equal to the relative date. 

How to use relative dates?

Relative dates can only be used in the project navigator's advanced search and it will apply both List and Releases view and you can use it with any date type field. You only need to take into account what field you want to filter through and then write it down as a PQL. Here you can find an example, find projects that were last updated more than two weeks ago:

updated < "-2w"

(warning) Please note that if you change the search from advanced to basic the relative dates will be changed to the exact date.