...
In this example we want to set the issue’s assignee based on the current assignee in the selected issue of issue picker field ‘customfield_10107’.
...
Syntax: Lookup issues
Code Block |
---|
key in ({{issue.customfield_10107}}) |
Syntax: Edit issue fields (Assignee)
Code Block |
---|
{{lookupIssues.first.assignee}} |
...
In this example we want to link the created issue with the selected issues in ‘customfield_10192’ using the ‘is blocked by’ link.
...
Syntax: Lookup issues
Code Block |
---|
key in ({{issue.customfield_10192}}) |
Syntax: Link issue to
Code Block |
---|
{{lookupIssues}} |
...
Using the syntax above also supports to link multiple selected issues at once.
Please make sure that the selected issue from issue picker are also in the scope of the automation rule.
Please check Atlassian’s documentation on ‘Lookup issues’
Add Jira-native linked Issues to Issue Picker
Issue Picker does not add issues, which are already linked natively in Jira to the Issue Picker custom fields.
You can, however, create an automation that checks for natively linked issues and add them to the issue picker custom field:
...
Syntax: Lookup issues
Code Block |
---|
issue IN linkedIssues({{issue.key}}, "is blocked by") |
Here issues with the Issue Link Type “is blocked by
“ are added to the Issue Picker custom field.
Syntax: Edit issue fields
Code Block |
---|
{
"fields": {
"customfield_10075": [{{#customfield_10075}}"{{.}}",{{/}}{{#lookupIssues}}"{{key}}"{{^last}}, {{/}}{{/}}]
}
} |
Here the Issue Picker Field is customfield_10075
.
Notes:
Please make sure that the issues added via the automation also confirm to the Issue Picker JQL condition. As the field is edited directly, the JQL condition cannot be enforced by Issue Picker at this time.
Please make sure that the natively linked issues are also in the scope of the automation rule.
Vary the trigger of your rule according to your needs (trigger periodically or when issue link is changed on the issue).
Please check Atlassian’s documentation on ‘Lookup issues’