Create linked issues with non required custom fields using automation
Platform Notice: Cloud - This article applies to Atlassian products on the cloud platform.
Summary
To create a linked issue, the linked issue create screen does not offer customization and only displays the default Summary and Description fields and the fields set as required in the field configuration. We have an open Feature Request to allow configuration and customization of linked issue screen which is tracked here: JSDCLOUD-3917 - Create a Linked Issue Screen.
The below KB illustrates a workaround using automation in which we can create a linked issue and populate other custom fields as required until the feature is released.
Environment
Jira Service Management Cloud and Automation for Jira
Solution
In this scenario, we will create a custom field, say "Needs linking?" which will have 2 options: Yes and No. Whenever the value for this option is set as "Yes", the automation rule will create a linked issue to the current issue and will copy the custom fields value from trigger issue to linked issue as required.
In this example, let's say I want to copy the Summary, Description and one custom field value from trigger issue to linked issue. Follow the steps as below:
- Create a custom field called "Needs linking?" if type single select having options "Yes" and "No". Add this field to the relevant screens.
- Create a new rule with Field Value changed trigger. Select the field as "Needs linking?".
- As we want the rule to trigger when the value is set as "Yes", add a condition by going to New condition > Advanced compare condition and set the values as below:
- Click on New action > Create issue and set the fields based on your requirement. Example:
- To link this newly created issue to trigger issue, create a new branch by clicking on New branch > Branch rule for the Most recently created issue.
- In the branch, add an action to link this cloned issue to your original subtask by clicking on New action > Link issue and selecting the link as "is blocked by" (you can choose the relation based on your requirement).
- (Optional) You can also add another action in the main branch at the end of the rule to edit the "Needs linking?" custom field to "No" so that in case the user wants to create another linked issue, they can again set the option to Yes to trigger the rule.