Apps documentation
Issue Templates for Jira
Cloud Server/Data Center
Issue Templates for Jira

Cloud

Server/Data Center

Version 8.x
Version 7.x
FAQ
Release notes
Articles & Videos
Last updated Apr 16, 2023

JQL searchers

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.

Info

For more information about JQL searching, see the official Atlassian documentation on Advanced Searching and Advanced Searching Functions.

createdFromTemplate

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
Note

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")

Tip

You can also find issues created from a particular template by clicking on the number next to Used in in Issue Templates panel in the template’s issue view. A page with JQL search results will open.

Jira Issue Templates - How to find issues created from a particular template
Issue Templates for Jira - How to find issues created from a particular template

templateForIssue

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.
Note

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")

Warning

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.

searchTemplates

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:

  • To find templates assigned to the Human Resources category:
    searchTemplates("category","Human Resources")
  • To find templates that are not assigned to any category:
    searchTemplates("category","NO_CATEGORY_ASSIGNED")
    searchTemplates("category","EMPTY")
    searchTemplates("category","")
  • To find templates that use a scope named Onboarding for the Autocomplete function (Fields > Set of fields):
    searchTemplates("autocompleteScopeName","Onboarding")
  • To find templates that use a scope containing the Priority field for the Copy function (Fields > Different set of fields for post function):
    searchTemplates("copyScopeField","priority")
    Note
    To use 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.
  • To find templates that are enabled on the Jira Create issue screen:
    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")
  • To find templates available on the Jira Create issue screen, for the Developers (DEV) project:
    searchTemplates("projectAvailability","DEV")
    Note

    To use searchTemplates for the projectAvailability, the value needs to be equal to the project key. This JQL doesn’t support project names.

  • To find templates available on the Jira Create issue screen, for the Bug issue type:
    searchTemplates("issueTypeAvailability","Bug")
  • To find templates available on the Jira Create issue screen, for the Spanish-speaking users:
    searchTemplates("languageAvailability","Spanish") or searchTemplates("languageAvailability","ES")
  • To find templates that are available on the Customer portal:
    searchTemplates("enabledInRequestForm","true")
    searchTemplates("enabledInRequestForm","yes")
    searchTemplates("enabledInRequestForm","1")
  • To find templates that are available on the Customer portal for the specified request type:
    searchTemplates("requestTypeAvailability","CS/Technical support")
Need help?

If you can’t find the answer you need in our documentation, raise a support request.