Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Clone a Specific Task and its Sub-Tasks from a "Template" Epic on Transition within New Epic

We're working on creating a JIRA project for which Epics, when they are transitioned to a particular state, should have a Task and its Sub-Tasks copied from a "template" Epic.

Has anyone done anything like this?

I know that we can manually clone a Task and its Sub-Tasks, and then change the parent Epic of the newly cloned Task manually, but we would like to automate the cloning of the source Task / Sub-Tasks from the "template" Epic upon transition of a any new Epic, and we would like to prevent every cloned Task and Sub-Task from having its name prefixed with "CLONE - " if we can prevent that.

Why wouldn't we just clone the Epic itself?  Because it wouldn't make sense to have certain Tasks and their attendant Sub-Tasks as children of a new Epic if that Epic hasn't yet been transitioned to a specific state.

I've looked at the "Clones an issue and links" post-function that's provided by ScriptRunner ( https://scriptrunner.adaptavist.com/5.0.14/jira/builtin-scripts.html#_clones_an_issue_and_links ), but this will only clone the current issue, not a "template" task that you can specify.

If anyone happens to have example ScriptRunner / Java code that could perform this type of function, just let me know.

In terms of visualization of flow, what we are trying to achieve is:

  • For a New Epic, let's call it Epic A, in a JIRA Project
    • On Transition to State B
      • Define a post-function that will:
        • Create a new child Task C of Epic A by cloning a pre-defined "template" Task D (the ID for which should never change) from a "template" Epic E, and all of its sub-tasks.
        • For this now newly created child Task C, set the "Epic Link" custom field to the ID / Name of the the parent Epic, Epic A.
        • If required as an extra step, update the Summary for child Task C and its sub-tasks to remove "CLONE - " from the front of the Summary.

Just let me know the best way to start to approach this problem.

Thanks,
Mike

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Apps & Integrations

🍻🍂Apptoberfest Update: Upcoming Virtual Events 🎉

Hello Community! I hope you've been enjoying the 🍂Apptoberfestivities🍂 (I know I have!) The event is heating up next week with a series of virtual events that we're calling the 🍻🍂Partner App ...

78 views 1 6
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you