Profields includes JQL functions to search issues by the Advanced Searching feature.
These are project functions, so they must start with "project" and return a list of projects, so they must use the "IN" or "NOT IN" operators.
These are the functions:
Project Navigator search - projectFieldsQuery(PQL query)
This function returns a list of projects based on a Profields Query Language (PQL). You can configure a PQL query in the Project Navigator's Advanced Mode. Also, if you need a simple query, you can configure it on the Basic Mode and switch to the Advanced Mode to copy it and then paste it as the argument of the function.
It is important to notice that the PQL will have double quotation marks in it, so you are going to need to change then into single quotations marks. Please, be careful when doing this.
Example: You need to find all issues which their project is type "Business" and their lead is "User 1"
Steps to follow:
1 - Filter your projects
Go to Project Navigator and in the Project Type Filter select "Business", then in the Project Lead Filter select "User 1". As the result of this query, in our instance, we get 2 projects.
2 - Change the filter mode to "Advanced Search".
3 - Copy the query located in the textbox.
* Please notice that you need to change double quotation marks for single quotation marks. The ORDER Clause is not important in the issue navigator, you can remove it.
4 - Use PQL in Issue Navigaor
Go to the Issue Navigator and in the Advanced Mode type the query below. You need to type the PQL Query between double quotation marks (That is the reason because we need to replace them for single quotation marks)
As you can see, the issue navigator will show the Issues that belong to the projects we saw in the Project Navigator.
Project Navigator saved filter - projectFieldsFilter(Filter Id)
The mechanism of this function is the same as the projectFieldsQuery but it uses a previous saved filter to search for projects.
We will use the same example: You need to find all issues which their project is type "Business" and their lead is "User 1"
Steps to follow:
1 - Open the sidebar to get the filter id
Do a mouse hover over the saved filter item in the sidebar, a tooltip should appear.
You can also get it from the page's URL, if you click on the filter in a variable called "filterId" or if you.
2 - Go to the issue navigator an type the query.
We will get the same result as the previous example.