Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Automations - How to parent a story to an epic in the same automation

Eric Browning
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!
July 30, 2025

Hello,

I am trying to automate the creation of "release" work items. At a high lvl, I would like to do the following(see Image 1).

  1. Create a release (Release XX)
  2. Create a epic that has "Release XX" as a "fix Version"
  3. Create a story that is a child work item of the epic above

JIRAReleaseAutomation.PNG

I am running into issue with referencing work items that are created in the same automation.  For example, on the story I only see "current work item" and "trigger work item"(see image below).  Some things Ive tried are below:

  • using multiple automations but is getting difficult bc im passing multiple user inputs (due dates, assignee, ect) so id like to have it in all 1 automation
  • Setting up the additional fields of the story and referencing by the name of the epic
  • JIRAReleaseAutomation3.PNG

 

Is this possible to achieve?

 

JIRAReleaseAutomation2.PNG

1 answer

1 accepted

6 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.
July 30, 2025

Hi @Eric Browning -- Welcome to the Atlassian Community!

Rather than using JSON, you may enter the key for the most recently created work item (i.e., the Epic) when creating the Story in its parent field from the dropdown list:

{{createdIssue.key}}

Or, after the Epic is created, you may branch to most recently created work item, and then create the child Story in the branch...selecting Current Work Item as the parent.

 

Kind regards,
Bill

Eric Browning
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!
July 30, 2025

great thanks Bill! 

I am using the branching method mentioned.  It looks like you cant have nested branches.  Any idea on how i could relate the epic to the fix version with this limitation?

 Right now i have:

- create 1 release

- create multiple epics all with the release fix version

- create multiple stories/task under the epics above

JIRAReleaseAutomation4.PNG

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.
July 30, 2025

First, your branching is incorrect to use the Epic as the parent of the new Task.  Please try this:

  • trigger: manual
  • action: create version
  • action: create work item (for the Epic)
  • branch: to most recently created work item
    • action: create work item (for the Task), setting the parent to Current Work Item as that will refer to the Epic you are branching-to
    • ...repeat for additional Tasks

 

Next, to relate the Epic to the new Version, you may use advanced edit with JSON in the work item creation.  For example:

{ 
"fields" : {
"fixVersions" : [ { "name": "the name you used for the new version" } ]
}
}

 

One more important thing I noticed: you are creating work items in multiple projects.

Versions are associated to a specific Jira project.  When the rule runs and creates that version, you may optionally select the project, but when you do not, the version is created in the project for the rule scope (in the details at the top).

A work item cannot be associated to a version in a different project with Fix Versions.

Please carefully check that your version is in the same project as the Epic to associate it that way.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
ENTERPRISE
TAGS
AUG Leaders

Atlassian Community Events