Creating multiple Jira tickets automatically based on values selected in a custom multi-selection field, using Jira Automation.
Platform Notice: Cloud - This article applies to Atlassian products on the cloud platform.
Summary
Creating multiple Jira tickets automatically based on values selected in a custom multi-selection field, using Jira Automation.
Environment
- Product: Jira Service Management (Cloud)
- Features Used: Jira Automation
- Custom Field: Multi Customer Selection (multi-select field)
Diagnosis
Scenario:
- An agent updates an issue with values in the Multi Customer Selection field (e.g., Customer A, Customer B).
- Based on the selected values, separate tickets need to be created automatically.
Cause
Jira does not natively support the functionality to create multiple tickets from values selected in a multi-select field. A workaround using Jira Automation is required to achieve this.
Solution
Steps to Create an Automation Rule for Multiple Ticket Creation:
- Trigger:
- When: Issue Updated
- This trigger will run the rule whenever an issue is updated, checking for changes in the Multi Customer Selection field.
- When: Issue Updated
- Branch Rule :
- Branch: For Current Issue
- This setup ensures the rule iterates through each selected value in the Multi Customer Selection field.
- Branch: For Current Issue
- Condition:
- If/Else Block:
- Add a condition using Issue Fields Condition:
- Field: Multi Customer Selection
- Condition: Contains any of
- Value: Customer A (add more conditions for Customer B, Customer C, etc.)
- Add a condition using Issue Fields Condition:
- If/Else Block:
- Action:
- Create a New Issue:
- Summary: Set the summary, e.g., "Follow-up for Customer A - {{issue.key"{}}}.
- Description: Optionally include "Automated follow-up for customer based on {{issue.key"{}}}.
- Project: Same as the current project or specify a different one as needed.
- Issue Type: Set to the same issue type as the trigger issue or select a different type (e.g., Task, Sub-task).
- Create a New Issue:
How It Works:
- When an issue is updated, the rule checks the Multi Customer Selection field.
- It will iterate over each selected value using the Branch action.
- For each customer option selected, the rule creates a separate ticket with details based on your configuration.
JSON File for Direct Import:
I have included a JSON file of this automation rule for you to directly import into your Jira instance. This will help you quickly set up and test the rule without manually configuring all the steps.
You can import the rule using the following steps:
- Go to Jira Project > Project Settings > Automation > Import Rule.
- Upload the JSON file and follow the prompts to complete the import process.
This setup ensures that for every selected customer in the multi-select field, a corresponding follow-up ticket is created automatically.