How to use Jira Automation to copy components from Epics to the issues within the Epic

Holly Schomann
Contributor
August 11, 2021

I have tried using the answers from other posts on this topic, but those solutions are not working.  

I would like to use automation to copy the components of Epics to the children tickets (see below).  However, the automation keeps updating the epic.

I have moved the issues type condition and still no luck.

Holly

Screen Shot 2021-08-11 at 1.47.21 PM.png

 

 

3 answers

1 accepted

2 votes
Answer accepted
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.
August 11, 2021

Hi @Holly Schomann 

When you want to edit an issue, automation use the scope at that location in the rule.  In your image, you show a branch on the epic/parent and so that is what gets edited.

If you want the epic's components copied to its children, you could try this:

  • trigger: scheduled on JQL for any open (not completed) epics
  • branch: on the stories/issues in the epic
    • conditions: as needed... such as not done, etc.
    • conditions: doesn't already contain the components you want to set
    • action: edit issue fields components, use the ... menu to select Copy From Parent Issue

Best regards,
Bill

Holly Schomann
Contributor
August 12, 2021

Thanks Bill for your response. This is helpful. Can you include a visual, as I believe i have tried this as well.

I have the JQL searching for open epics with specific components.

I then just need all tickets in those epics to copy the components from the epic.  I still wasn't able to get it to work. 

If you could include a visual that would help me.

thanks so much

Holly

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.
August 12, 2021

Here you go, Holly...with some additional explanations about why it may not be working for you.

test rule to copy components, parent to children.PNG

  • The scheduled trigger uses JQL, such as this one I used to ignore some test components.  Change these as needed.
issueType=epic AND component IS NOT EMPTY AND component NOT IN ("ABC", "DEF")
  • The scheduled trigger disables the option "Only include issues that have changed since the last time this rule executed"  You may want to re-enable this after the rule runs the first time to improve performance.
  • The branch also disabled "Only include issues that have changed since the last time this rule executed" so changes to epics update children, even when they have not changed.
  • The Edit Issue changes the Components field, selecting Copy Components from Epic issue, as I described earlier
  • Also for that edit, there is a checkbox for Add to existing values
    • Leave that checked if you want the epic's components added, and
    • Clear it if you want the epic's components to replace values in the children

 

If that gives you problems, please post your rule image and the audit log from an execution.

Holly Schomann
Contributor
August 13, 2021

Bill!! 

OMG..thank you so much!  It worked!  I had spent so many hours on this. You are my hero!!

Not only did you save me from spending more time on this, but you also helped me look like a rockstar to my team.

I really can't thank you enough!

Hope that you have a good weekend.

My sincerest thanks,

Holly

Like Bill Sheboy likes this
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.
August 13, 2021

I am glad to learn that helped you, Holly.  I hope you have a great weekend!

__Bill

Like Holly Schomann likes this
Ramonde Zrihen
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!
June 20, 2022

@Bill Sheboy : hi ! can you please help in copy components from one project to another using Automation in cloud ?

thanks !

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.
June 20, 2022

Hi @Ramonde Zrihen 

First thing, as your question seems a bit different from this thread, I recommend creating a new question and then linking to this one for reference.  That will get the most visibility so the community can help.  Otherwise only the people following this thread will see it.

Next, components are configured at a project level, and so you could

The approach you select may depend upon your ability to purchase an addon, and how often you need this and other constraints (e.g. what happens when components change between projects).

Kind regards,
Bill

Ramonde Zrihen
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!
June 20, 2022

@[deleted] : thank you for your quick reply ! i thought there might be an easier solution rather "managing" it while edit / delete etc'... /buying add on / update manually

thank you in advanced !
Cheers !!
Ramonde

Like Bill Sheboy likes this
0 votes
justyna oltarzewska
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!
November 19, 2024

Hello, I tried to replicate this automation in my project and it doesn´t work, do you have any Idea why? Maybe it is about JQL ... I don´t know what should I put inthere, Attached  screenshotCapture1.JPGCapture2.JPGs

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.
November 19, 2024

Hi @justyna oltarzewska -- Welcome to the Atlassian Community!

As this is a very old thread, I recommend creating a new question, and perhaps including a link to this one.  That will ensure the maximum number of people see it to offer suggestions.  Otherwise, only people following this older thread will see it.

When you post your question, please include images of the complete rule, the audit log details showing the rule execution, and explain what is not working as expected.

 

Until we see your new question...

I note your rule trigger has the option selected "Only include issues that have changed since the last time this rule executed".  And so many issues may be excluded from the rule processing them.

And, the trigger JQL just checks the component field is empty.  Do you also want this rule to ignore completed issues?

 

Kind regards,
Bill

0 votes
Julien Peyrade _ Elements
Atlassian Partner
August 12, 2021

Hello @Holly Schomann 

Another solution would be to use an add-on.

I'm the Product Manager of Elements Copy & Sync, which lets you do just want your are requesting. You can copy the Components to the issues under the Epic when you create them, and keep them synchronised afterward.

Don't hesitate to ask if you have any question.

Kind regards,

Julien

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