JQL Search and JQL Variables
The Advanced Links feature in Jira Cloud provides practical JQL functions to help you efficiently search and manage linked assets. By leveraging these functions, you can find all issues within certain advanced link relationships, enhancing your ability to track and manage your assets.
Basic JQL Search
“Inward / Outward Field Name”
You can search for issues that are related to each other by using the following syntax:
“Outward / Inward Field Name” = KEY-1
Available Operators
=
!=
is not
is
not in
in
Example
project = CRM AND “Contact Organization” = CRM-4
→ This will give you all issues from project = CRM that contain “CRM-4” in the asset relation field “Contact Organization” (which is equal to all issues connected to the contact organization “CRM-4”).
Advanced JQL Search
The app provides a unique JQL function to find all issues within specified advanced link relationships. This function lists all related issues, starting from a specified node and spanning through the specified link.
Syntax:
issue in link("JQL", "link_direction_name OR link_name", "link_level")Parameters:
JQL: This is the node to start your search from. You can use regular JQL syntax to define your node or nodes. The start node is always included in the search results list.
link_direction_name OR link_name: Specify one or more link direction names you want to search for in the network. You can use either:
the exact direction names from the Advanced Link configuration, or
the full Advanced Link name
For example, if you have an Advanced Link “Organisation - Contacts” with:
inward direction: “Contact Organisation”
outward direction: “Contacts”
you can use any of the following in your search:
Organisation - Contacts (full Advanced Link name)
Contact Organisation (inward direction)
Contacts (outward direction)
*searching using both advanced & default links is supported
link_level: Specify the depth of your search as "level1", "level2", "level3", or "level4". The maximum level depth is 4.
If you’d like to search through several Advanced Links, multiple link_name parameters can be listed in the following format:
issue in link("JQL", "link_name1", "link_name2", "link_level")The starting node for the search will always be displayed in the search results. For example, in the screenshot below, you can see that a JQL parameter = CRM-18. But we can also see an issue with the key = CRM-18 issue key in search results.
Users can quickly perform searches by using our Search Link dialog in Issue Search or in Assets Navigator. Discover the search tools integrated within the user interface here.
If users want to search deeper than level 1, they always must mention all link types that connect the starting search node with the final search result.
In some cases, Jira may return cached results for issue in link queries. To ensure the query is recalculated, you can add any random value as the last parameter after link level.
Example:
issue in link("JQL", "link_name1", "link_name2", "link_level", "qwertyuiop")This value does not affect the query logic.
JQL Variables
The variables below can be used for data logic configuration for both, Advanced Links and Issue Filter panels.
{key} = fetches the issue key of the current issue.
{projectkey} = fetches the project key, in which the current issue is stored.
{assignee} = fetches the value of an ‘Assignee’ field from the current issue
{reporter} = fetches the value of a ‘Reporter’ field from the current issue
{fixversions} = fetches the value of a ‘Fix Version/s’ field from the current issue
{versions} = fetches the value of a ‘Affected Version/s’ field from the current issue
{currentUserOrganizations} = fetches the value of a organization from the current user
{customfield_xxxxx} = fetches the value from a custom field from the current issue (only single-line text & single-select fields are supported).
When writing a JQL condition using variables, make sure to wrap the variable in quotes, e.g. summary ~ "{customfield_10095}"