Forums

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

How to copy components from several issues to one single issue?

Valentin CHAPLET
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 15, 2025

Hi all,

I'm trying to do an automation when a specific link is created between two predefined types of issue (A and B), I copy the components from issue A and paste them into issue B.

To do this, I created a lookup using the JQL query: issue in linkedIssues({{triggerIssue.key}}, ‘is mitigated by’) then I created an edit issue by modifying the component field with the following smart value: {{lookupIssues.components.name.distinct.sort.join(‘,’)}}

I tried several combinations, but I never managed to copy/paste the components. Either I've got an error "Couldn't edit the Components field - the component doesn't exist" (the issues are in the same project and share the same predefined components), or I have no action happening.

 

Thank you for your help

2 answers

1 accepted

4 votes
Answer accepted
Piyush Annadate _ACE Pune_
Community Champion
May 15, 2025

Hello @Valentin CHAPLET ,
Welcome to the Community !

You've already did the conditions; additional you may need to do as below:

- Advanced Branching as"{{destinationIssue.components}}"  and variable name as 'comDetails'
- Edit issue and add below in additional fields:

{
"update": {
"components": [{
"add": {"name": "{{comDetails.name}}"}
}]
}
}

Screenshot 2025-05-15 at 1.26.24 PM.png
In above, we are adding components to the exists, not overwriting them !

Note: Rule executes when an issue is linked to another issue. {{issue}} will always refer to the source issue, so if ISSUE-A is blocked by ISSUE-B, this rule will execute on ISSUE-B. To access ISSUE-A, use {{destinationIssue}}, and to access the link type, use {{linkType}} (e.g. {{linkType}}

Valentin CHAPLET
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 15, 2025

Hello @Piyush Annadate _ACE Pune_ ,

Thank you for your reply, the explanation is really clear.

1 vote
Alexander Hohmann
Contributor
May 15, 2025

May I somewhat relativise the assertion '{{issue}} will always refer to the source issue'?

Actually, you could create a branch for linked issues and have that branch run through all the work items connected through a certain link type like 'relates to' or 'is blocked by'. In that case, to my knowledge, {{issue}} will refer to the issue(s) the branch is working on, and the triggering issue would be the 'triggerissue'.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events