Copy data from a specific issue into newly created issue

Simon Galiazzo October 15, 2023

Hi gurus!

I am trying to copy some data (description, attachment, and a custom field) from a specific previous task [ABC-123], into a new task that is created, FYI both of these tasks are under the same epic [ABC-001].

Therefore, I am trying to trigger the automation to run when an issue is created under that epic, to copy data into the new task. Also, I am trying to utilize 'Edit Issue' actions rather than cloning issues, as there is other data from that task I do not need. 

  • Epic = ABC-001
  • Previous Task = ABC-123
  • New Task = ABC-456

My current setup is:

  • Trigger = Issue Created
  • IF = Conditions are met
  • Action = Edit fields
    • This action segment is where I am having issues, can I somehow utilize the previous issues key in conjunction with smart values to copy the data I need? Something like:
    • Edit Issue - Description: {{ABC-123.description}} ?

 

1 answer

1 accepted

3 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.
October 15, 2023

Hi @Simon Galiazzo -- Welcome to the Atlassian Community!

Have you considered using Clone Issue and clearing the fields you do not need?  That will make copying the attachment easier.

Back to your original question...

To access that other issue as a source for copying to the new issues, try using JQL to find it and the Lookup Issues action: https://support.atlassian.com/cloud-automation/docs/jira-automation-actions/#Lookup-issues

And as an FYI, when you use the Issue Created trigger, I recommend always following that with a Re-fetch Issue action.  That trigger can fire so quickly that the data may not yet be available, leading to conditions and actions not working as expected.

Kind regards,
Bill

Simon Galiazzo October 15, 2023

Thanks @Bill Sheboy !

I had a play around again and managed to do what I needed to with a combination of setting the fields with data and copying some fields from the Epic. But thanks for your suggestion and the note about re-fetching issue data, that definitely helped and will keep that in mind for future rules using that trigger as well.

Like Bill Sheboy likes this

Suggest an answer

Log in or Sign up to answer