Check out JQL functions available for issues created using Issue Templates
Issue Templates for Jira provides three JQL functions described below. They can be used in any place in Jira where using JQL is available: in the Issue Navigator, in a Saved Filter, as an Agile Board query, etc.
Make sure you have necessary Permissions before you start configuring.
For more information about JQL searching, see the official Atlassian documentation on Advanced Searching and Advanced Searching Functions.
The createdFromTemplate
JQL function lets you search issues created from a particular template.
To specify a searching condition in JQL, use the following format:
issue in createdFromTemplate("template_issueKey")
Function argument | Description |
---|---|
template_issueKey | The issue key of the template |
You need to add the Template field to appropriate screens and request types in projects that use Issue Templates.
A template will be saved in the field and you’ll be able to search the value in JQL.
Example:
To find issues created from the TEMP-15 template:
issue in createdFromTemplate("TEMP-15")
The templateForIssue
JQL function lets you search for a template that has been used to create a particular issue.
To specify a searching condition in JQL, use the following format:
issue in templateForIssue("issueKey")
Function argument | Description |
---|---|
issueKey | The issue key of issue created from the template. |
You need to add the Template field to appropriate screens and request types in projects that use Issue Templates.
A template will be saved in the field and you’ll be able to search the value in JQL.
Example:
To find the template used to create the DEV-372 issue, use:
issue in templateForIssue("DEV-372")
This JQL function doesn’t support subtasks created from template using Issue Templates versions that are older than version 7.4.0, because we didn’t collect the specified data. Search results can be empty.
The searchTemplates
JQL function lets you search for templates that follow defined conditions.
To specify a searching condition in JQL, use the following format:
issue in searchTemplates("argument", "value")
Function argument | Value | Description |
---|---|---|
templateName | Values specified for the argument | The configuration defined under General > Template name |
category | Values specified for the argument (names of categories) or NO_CATEGORY_ASSIGNED / EMPTY / "" (empty string) |
The configuration defined under General > Category |
autocompleteScopeName autocompleteScopeField autocompleteScopeId copyScopeName copyScopeField copyScopeId |
Values specified for the argument | The configuration defined in the Fields tab |
enabled disabled enabledOnCreateIssueScreen |
True / Yes / 1 or False / No / 0 |
The configuration defined under Availability > Create Issue Screen |
enabledInRequestForm | True / Yes / 1 or False / No / 0 |
The configuration defined under Availability > Request form |
projectAvailability projectCategoryAvailability issueTypeAvailability screenAvailability groupAvailability userAvailability languageAvailability |
Values specified for the argument | The configuration defined under Availability > Create Issue Screen |
requestTypeAvailability | Values specified for the argument | The configuration defined under Availability > Request form |
Examples:
searchTemplates("category","Human Resources")
searchTemplates("category","NO_CATEGORY_ASSIGNED")
searchTemplates("category","EMPTY")
searchTemplates("category","")
searchTemplates("autocompleteScopeName","Onboarding")
searchTemplates("copyScopeField","priority")
autocompleteScopeId
and copyScopeId
, you have to provide a scope (Set of fields) ID. You can find it in the ID column in the following database table: AO_33A75D_IT_PROFILE.searchTemplates("enabled","true")
searchTemplates("enabled","yes")
searchTemplates("enabled","1")
searchTemplates("disabled","false")
searchTemplates("disabled","no")
searchTemplates("disabled","0")
searchTemplates("enabledOnCreateIssueScreen","true")
searchTemplates("enabledOnCreateIssueScreen","yes")
searchTemplates("enabledOnCreateIssueScreen","1")
searchTemplates("projectAvailability","DEV")
To use searchTemplates
for the projectAvailability
, the value needs to be equal to the project key. This JQL doesn’t support project names.
searchTemplates("issueTypeAvailability","Bug")
searchTemplates("languageAvailability","Spanish")
or searchTemplates("languageAvailability","ES")
searchTemplates("enabledInRequestForm","true")
searchTemplates("enabledInRequestForm","yes")
searchTemplates("enabledInRequestForm","1")
searchTemplates("requestTypeAvailability","CS/Technical support")
If you can’t find the answer you need in our documentation, raise a support request.