- First steps
- Project setup
- Sample templates
- Migration to Cloud
- Supported fields
- Jira Service Management
- Template management
- Create a template
- Template configuration
- Template Navigator
- Delete a template
- Use as a template
- Set of Fields - advanced features
- Using template
- Default Template
- Apply template
- Use Template in Jira Automation
- Automatic create and close
- JQL Searchers
- Direct links
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:
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.
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.
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).
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
Other issue links (for example between a story and a task) are not supported. The Context tab is available Template details view only for:
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.
- Go to Jira Administration > Issues > Custom fields.
- Click Add custom field.
- Select Checkboxes.
- Click Next.
- Give your custom field a recognizable name, for example, Onboarding checklist.
- Add options with exactly the same names as your subtasks' summaries.
- Click Create.
- Add the Checkboxes and the Template custom fields to the Create issue screen in your target project.
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.
To enable the template:
- Open the newly created story template, in our case: New employee onboarding.
- Go the Availability tab and enable the template on the Create issue screen.
- Go the Fields tab and add the Onboarding checklist custom field to the Set of fields.
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.
- Open the Context tab of the newly created subtask template.
- Specify a JQL condition that will check if its summary is included on the checklist. In our case:
"Onboarding checklist" in ("Office tour").
- Add similar conditions to all the subtasks, based on this model:
"Onboarding checklist" in ("Summary of the subtask").
The conditions are set.
Creating issues with JQL conditions
Finally, we can use our template to create selected issues in the target project.
- Open the Create issue screen in you target project.
- Select the template containing your subtasks, in our case: New employee onboarding.
- Select only some of the subtasks from the checklist.
- Click Create.
Only selected subtasks got created in your target project.
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.
If you can’t find the answer you need in our documentation, raise a support request.