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

Context

Set up your template in the context of other issues and projects

In the Context tab you can determine the way your template works in other projects. You may want to automatically generate subtasks from a template, create issues in different projects, or use JQL criteria to create an issue.

Scroll down to see descriptions of each option:

Jira Issue Templates - Template Details: Context
Issue Templates for Jira - Template Details: Context
  1. Target project and issue type
    If you want your template to create new Jira issues in a different project, choose the project and the issue type of those future issues. They will be created together with the issue generated by your template.

    Example

    This feature is particularly useful for complex processes, like a new employee onboarding. One Story of an Epic can be automatically created in an HR project and the other one in an IT Support project, together with all subtasks related to hardware, accounts and access rights.

    Info
    • Choosing a template on the Create issue screen always overrides the choice made in this tab. For example, if you set up a template to create a Story in the HR Project and select the same template on the Create issue screen in the IT Support project, the Story will only be created in the IT Support project.
    • In order to copy subtasks or create more complex structures of issues you need to add the post function Create Structure to the target project’s workflow.
  2. Issue creation criteria
    Here you can configure conditions for creating issues from their parents (stories from an epic and subtasks from a story). Learn more in the next section.

  3. Copy subtasks
    By default, all subtasks from your template will be generated together with the new issue. Switch off the toggle if you’d like to stop them from being created (they will not be deleted - only disabled).

Info

Subtasks always get created in the same project as their parent issue.

JQL criteria for creating issues

You can set up conditions for issue creation using JQL. The children issues will be created only when their parent issue fulfills the criteria. This mechanism works for:

  • subtasks under a story
  • stories under an epic
Note

Other issue links (for example between a story and a task) are not supported. The Context tab is available Template details view only for:

  • stories
  • subtemplates
  • subtasks
Example

All possible JQL queries are supported, allowing you to set very specific conditions. For example, you can require that a subtask gets created only if:

  • the parent issue changes its status
  • any of the fields or custom fields contain a specific value
  • issue reporter or assignee is a defined user
  • the parent issue has a certain priority, due date, or label

See the use case in which a template with subtasks is created only when their parent issue fulfills custom JQL criteria - Issue creation criteria

Creating a Checkboxes custom field

Now let’s create a checklist that will determine which subtasks should be created each time the story template is applied.

Steps

  1. Go to Jira Administration > Issues > Custom fields.
  2. Click Add custom field.
  3. Select Checkboxes.
  4. Click Next.
Jira Issue Templates - JQL criteria for creating issues from templates: Jira subtask template
Issue Templates for Jira - JQL criteria for creating issues from templates
  1. Give your custom field a recognizable name, for example, Onboarding checklist.
  2. Add options with exactly the same names as your subtasks’ summaries.
  3. Click Create.
Jira Issue Templates - JQL criteria for creating issues from templates: Jira subtask template
Issue Templates for Jira - JQL criteria for creating issues from templates
  1. Add the Checkboxes and the Template custom fields to the Create issue screen in your target project.
Jira Issue Templates - JQL criteria for creating issues from templates: Jira subtask template
Issue Templates for Jira - JQL criteria for creating issues from templates

Result

The checklist is added to the Create issue screen.

Set of fields and availability

Now it’s time to activate our template. We also need to add the newly created custom field to the template’s set of fields.

Steps

To enable the template:

  1. Open the newly created story template, in our case: New employee onboarding.
  2. Go the Availability tab and enable the template on the Create issue screen.
Jira Issue Templates - JQL criteria for creating issues from templates: Jira subtask template
Issue Templates for Jira - JQL criteria for creating issues from templates
  1. Go the Fields tab and add the Onboarding checklist custom field to the Set of fields.
Jira Issue Templates - JQL criteria for creating issues from templates: Jira subtask template
Issue Templates for Jira - JQL criteria for creating issues from templates

Result

The template is set up to work on the Create issue screen.

Setting JQL criteria for creating subtasks

With our checklist ready, we can now set JQL conditions in every subtask, so that it will only get created when its corresponding checklist option is selected.

Steps

  1. Open the Context tab of the newly created subtask template.
  2. Specify a JQL condition that will check if its summary is included on the checklist. In our case: "Onboarding checklist" in ("Office tour").
  3. Add similar conditions to all the subtasks, based on this model: "Onboarding checklist" in ("Summary of the subtask").
Jira Issue Templates - JQL criteria for creating issues from templates: : Jira subtask template
Issue Templates for Jira - JQL criteria for creating issues from templates

Result

The conditions are set.

Creating issues with JQL conditions

Finally, we can use our template to create selected issues in the target project.

Steps

  1. Open the Create issue screen in you target project.
  2. Select the template containing your subtasks, in our case: New employee onboarding.
  3. Select only some of the subtasks from the checklist.
  4. Click Create.
Jira Issue Templates - JQL criteria for creating issues from templates: Jira subtask template
Issue Templates for Jira - JQL criteria for creating issues from templates

Result

Only selected subtasks got created in your target project.

Jira Issue Templates - JQL criteria for creating issues from templates: Jira subtask template
Issue Templates for Jira - JQL criteria for creating issues from templates
Note

Information about the creation of every subtask will be visible in the app notification and in the Event log. Even if the subtask hasn’t been created, the app will inform you that the criteria for this subtask haven’t been met.

Jira Issue Templates - JQL criteria for creating issues from templates: Jira subtask template
Issue Templates for Jira - JQL criteria for creating issues from templates
Need help?

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