Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,555,469
Community Members
 
Community Events
184
Community Groups

How to copy assignee from linked issue to trigger issue?

Edited

How to copy assignee from linked issue to trigger issue?

Hi, guys!

Need help in Jira Automation again

I need to create automation rule for next case:

When Issue status change from "A" to "B"

AND Component EQUALS to "SOME"

Then COPY assignee field from Linked Issue WITH Type = Story TO Trigger Issue 

 

Thanks a lot for your help!

 

2 answers

1 vote
Bill Sheboy
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.
Nov 23, 2021

Hi @Dmytro Shaforost 

What have you tried thus far to solve this? 

I recommend using a branch or lookup issues to find the linked issue, save the assignee, and then you should be able to update the trigger  issue.  If you decide to use the lookup, you can directly use the value in the edit.

  • trigger: issue transition
  • action: lookup issues on JQL to get a linked issues of that type
  • condition: the lookup count equals 1
  • action: edit issue to copy the assignee from the lookup

Kind regards,
Bill

Thanks @Bill Sheboy i give up :( i can't write jql request to get a linked issues of that type... I don't understand how to get list of linked issues with type story from trigger issue

and how to set a condition count = 1

 

@Bill Sheboy can you help with that? 

Bill Sheboy
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.
Nov 29, 2021

Please try to use the linkedIssues() function:

https://support.atlassian.com/jira-software-cloud/docs/advanced-search-reference-jql-functions/#Advancedsearchingfunctionsreference-linkedIssueslinkedIssues--

For example, to find the linked stories for the trigger issue:

issue IN linkedIssues( {{triggerIssue.key}} ) AND issueType = Story

Please also look at the documentation for lookupIssues and lists to learn about size:

{{lookupIssues.size|0}}

Like Dmytro Shaforost likes this

The following procedure worked for me to copy the assignee from a freshly linked issue:

1. Link the issue you want to link with the "Link issue" action
2. Call the "Re-fetch issue data" action
3. Use the "Edit issue" action (assignee) with the smart value {{issue.issuelinks.first.inwardIssue.assignee}}

Probably only step 3 is relevant for your use case. I just wanted to point out how it works if you just linked the issue in the same automation rule.

Remark: Mind the direction of the issue link. If the issue you want to edit has an outgoing connection, you'll have to replace inwardIssue by outwardIssue.

Hope this helps.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events