- Configuration
- First steps
- Project setup
- Sample templates
- Migration to Cloud
- Supported fields
- Permissions
- Jira Service Management
- Template management
- Create a template
- Template configuration
- Variables
- Template Navigator
- Delete a template
- Use as a template
- Set of Fields - advanced features
- Using template
- Autocomplete
- Default Template
- Apply template
- Use Template in Jira Automation
- Automatic create and close
- JQL Searchers
- Direct links
- Create Structure post function
- About Create Structure
- Create Structure configuration
- App integrations
- REST API
- ScriptRunner and Groovy scripts
Modify current issue mode
Learn how to apply templates to issues created in one project
With Create Structure you can choose between two ways of applying a template:
- Inherit from current issue - users can choose a template in a custom field
- Choose a fixed template - a template once selected in the post function configuration will always be applied to new issues in the workflow
In both cases you’ll need to prepare your structure of templates beforehand. So, if you need an epic with stories and subtasks, just create that model structure within the Template Repository project (TEMP). Give it a recognizable template name, in order to find it easily back at this point.
If your template is an epic with stories and subtasks, then while creating that epic, the stories and subtasks will be created automatically. All field values you’ve provided in your template will be copied into the right fields in the target issue, too.
Create Structure will always create the entire structure of issues and override the availability settings of the particular issues. For example, when a story is set as unavailable it only means that it won’t be selectable within the Template field. However, when its parent epic gets created using the post function, the story will be created as well.
You’ll find more information about the post function parameteres and all possible configuration modes in the Create Structure configuration chapter.
Modify current issue (inherit template)
Steps
To enable choosing templates for newly created issues:
- Add the Create Structure post function to the first workflow transition (Create).
- Select Modify current issue as the Operation mode.
- Select Inherit from current issue in the Template field.
- Leave the default value for Subtask stage as none.
- Click Add.
Remember to add the Template custom field to the relevant screen.
Result
Users can select a template from a custom field on the Create screen.
Modify current issue (fixed template)
This mode is best for workflows where you don’t want to show users the Template custom field on the Create or transition screen. Otherwise, they might try to choose a template but they never will, because a template once selected in the post function will be applied every time and can’t be changed.
Steps
To apply a fixed template to all new issues created in your chosen workflow:
- Add the Create Structure post function to the first workflow transition (Create).
- Select Modify current issue as the Operation mode.
- Select the proper template from the drop-down list next to Template.
- Leave the default value for Subtask stage as none.
- Click Add.
Result
The chosen template is always applied to new issues created in the workflow.
Next steps
- To learn how to create linked issues in different projects, go to Create new issue.
- To learn how to schedule additional subtasks to be created during a different transition, see Create subtasks during transition.
- If you need to optimize Jira performance while creating a large structure of linked issues, check out Execute post function asynchronously.
- To analyze a real-life example, read our Use case.
If you can’t find the answer you need in our documentation, raise a support request.