I have the following automation created:
If Issue 1 created then
Issue 2 created (linked to issue 1) AND
Issue 3 created (linked to issue 1)
Is it possible to configure the automation to link Issue 2 and Issue 3 as well?
Thanks,
Hi,
You can link multiple issues when creating a new issue by using the 'More Options' drop down on the issue create component. Here, add a json payload with the issue links, following the style outlined here: https://support.atlassian.com/jira-software-cloud/docs/advanced-field-editing-json/
For you case, the Issue 2 can be referenced in smart values as {{createdIssue}}. So you json would look like:
{"update": {
"issuelinks": [
{
"add": {
"type": {
"name": "Relates"
},
"outwardIssue": {
"key": "{{issue.key}}"
}
},
"add": {
"type": {
"name": "Relates"
},
"outwardIssue": {
"key": "{{createdIssue.key}}"
}
}
}
]
}
}
This would be the 'More Options' payload for your issue 3, where the first is the link to issue 1, and the second is the link to the issue 2. You can also change the type from "Relates" to whichever link type you want
Hope that helps,
Thanks
Hi Sam,
I have a manual automation that creates 7 stories.
When the 3rd one is created, it needs to be linked to the previous 2 with "is blocked by".
I tried to use the code that you suggested (used 'Create variable' for the keys of the 2 issues), but for some reason, only the last one is linked.
What am I missing?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.