How can I automatically create a story on epic transition?

Andreas Knecht Community Champion Sep 08, 2016

So here is what we're trying to do: when an Epic issue type is transitioned to a certain status, we need it to create a Story issue type, and here's the kicker: we need it to have the same assignee as the one from the Epic issue that triggered this issue creation

1 answer

1 accepted

0 vote
Andreas Knecht Community Champion Sep 08, 2016

You can do this with Automation for JIRA.  It requires a bit of advanced config in the "create issue" action but it's pretty straightforward.

Here's an example rule configuration:

epic-story-creation.png

It's made up out of 4 components:

  • The issue transitioned trigger so we start rule execution when an epic is transitioned
  • One condition to check the issue is in fact an "Epic"
  • Another condition to check which status we were transitioned to - "In Progress" in this case
  • Finally we create a story with some advanced config.

 

The advanced config is:

{
    "fields": {
        "assignee": {
             "name": "{{issue.fields.assignee.key}}"
        },
        "Epic Link":"{{issue.key}}"
    }
}

 

This does 2 things:

  • It sets the assignee of the newly created issue to the same assignee of the epic that was transitioned ({{issue.fields.assignee.key}} will be the epic's assignee
  • It sets the epic custom field to the {{issue.key}} of the epic.  This means the new story will be linked to the Epic already once it's been created.  You may not need this.

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published Jul 10, 2018 in Marketplace Apps

If you’re an Atlassian app developer, you’ll want to know about Atlas Camp!

This September 6-7, hundreds of Atlassian App developers will flock to Barcelona Spain to build skills, discover product roadmaps, meet face-to-face with the Atlassian team, and learn how to extend t...

173 views 0 4
Read article

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you