copy components from parent issue

Piotr Nowak October 6, 2020

Hi Atlassian community,

I am looking for a script that will allow to copy components from parent issue using scriptrunner, but add components, not overwrite. Components should be copied at the creating stage of a given issue
e.g.
1.if the new issue is "Task", the parent is "Epic" from the "Epic Link" field
2. if the new issue is "Sub-task" then the parent is "Task"
3. if the new issue is "epic" it shouldn't copy anything

Someone something?

2 answers

1 accepted

1 vote
Answer accepted
Alyson Briscoe October 6, 2020

Hi @Piotr Nowak 

 

afraid i cant help with writing a script but if you have JSU Automation, you can add the below post function; 

Copy Value From Other Field (JSU)Copies the value of one field to another, either within the same issue or between related issues (as issue link, Parent/Sub-Task, Epic/issues in Epic or found by JQL).

 

https://marketplace.atlassian.com/apps/5048/jsu-automation-suite-for-jira-workflows?hosting=cloud&tab=overview

 

I use JSU a lot as it provides us with lots of valuable extras to make life a little easier!

 

if you don't have JSU, i'm sure someone will be able to comment and help you with a script 

 

good luck 

 

Thanks

Ally 

Piotr Nowak October 8, 2020

Hello,
Thanks, I didn't know that it could be done it that way.

0 votes
Niranjan
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.
October 6, 2020

Hi @Piotr Nowak ,

This can help to achieve this

https://library.adaptavist.com/entity/copy-field-value-from-parent-issue-to-sub-task-upon-creation

You may need little tweaking of the script.

Suggest an answer

Log in or Sign up to answer