Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Edit assignee of Issue with value from related/ Lookup issue

Chris K
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 9, 2023

Dear Atlassian community,

 

My colleague and I are struggling with an automation rule which just doesn't want to get working. In the rule, we use the Lookup issues action, which we use to find issues with the same material number (which is a custom field in our instance). We then link these issues as parent and child, which works perfectly fine via the advanced edit action. We can determine the children by a slightly different number, which contains the number of the (one and only) parent. After the creation of the link, we'd like the children to be edited by adding the values of the assignee and another custom user picker field from the parent (after refetching the issue data).

Unfortunately, we constantly run into an error ("expected Object containing a 'name' property (assignee)"), when trying to do so.

We tried different approaches and thought the solution for the edit action (in this example assignee) should look like this:

{
"fields": {
"assignee": { "id": "{{issue.issuelinks.first.outwardIssue.assignee}}" }
}
}

 

We also tried the following smart values:

{{issue.issuelinks.first.outwardIssue.assignee.displayName}}

{{issue.issuelinks.first.outwardIssue.assignee.Name}}

{{lookupIssues.assignee}}

{{lookupIssues.assignee.displayName}}

{{lookupIssues.assignee.Name}}

 

This is a combined solution from the following threads:

https://community.atlassian.com/t5/Jira-questions/Automation-how-to-set-an-assignee-through-the-JSON/qaq-p/1978158

and

https://community.atlassian.com/t5/Automation-questions/How-to-copy-assignee-from-linked-issue-to-trigger-issue/qaq-p/1869878

 

Thank you for your help!

 

Kind regards,

Chris

 

1 answer

1 accepted

0 votes
Answer accepted
Chris K
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 9, 2023

The solution came right after I created this post:

{
"fields": {
"assignee": { "name": "{{issue.issuelinks.first.outwardIssue.assignee}}" }
}
}

 A small change within a code, but a huge change for an automation :D

 

Thank you anyway! ;)

Suggest an answer

Log in or Sign up to answer