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!
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
Kind regards,
Bill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Please try to use the linkedIssues() function:
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}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Dmytro Shaforost I had a similar issue just now. Using @Bill Sheboy 's insight I was able to implement it. This is how I tested it (hene the manual trigger and lack of other conditions), you can adapt from it:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Diogo Teles
This worked for me, thank you! But is there a way to let this automation run automatically instead of via manual trigger?
When an issue is created and afterwards gets assigned to somebody I need the assignee to be copie to the trigger issue automatically.
Thanks in advance!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.