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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,461,769
Community Members
 
Community Events
176
Community Groups

Jira Automation

I am new to Jira Automation, so this is probably a simple question that I need help with. I am trying to create a series of Jira issues after a manual trigger. I need to create an Epic and several Stories as children of the Epic. In my testing, I have not found a way to successfully create the Epic and a Story that is a child of the Epic. I can create both issues, but the parent link relationship is not being set. Any wisdom or suggestions?

 

Thank you in advance for your help!

2 answers

2 accepted

0 votes
Answer accepted

Hi @Don Hames 

Use the following rule. This worked for me on my instance:

create epic with story.png

Hi @Don Hames 

Yes, and...to Alex's answer:

As you want to add multiple stories linked to the issue, when setting the epic link within the branch please use {{issue.key}} as that will refer to the epic in the branch.

If you instead use {{createdIssue.key}} that will refer to the last issue created, and so the second story added will attempt to refer to the first one, and so on, leading to errors.

Kind regards,
Bill

Like # people like this

@Bill Sheboy thanx for this correction!

Like Bill Sheboy likes this

Thank you, @Bill Sheboy and @Alex Koxaras _Relational_ Your suggestion worked the first time, and I can now create multiple Stories in my Epic. This is just what I needed, and thank you for such a quick response.

 

Just one last question on the same subject, I need to create the Stories in a separate project from my Epic. It's working only because I enter the other project's name on the Create Issue:

Can the destination project name be overwritten with the More Options JSON script? 

Create Issue.png

I would expect to use a smart value on the project placeholder, rather that JSON of the below field. Project and summary (and reporter) are the required field to create any issue on Jira. What exactly is the business requirement?

@Alex Koxaras _Relational_  I have a master project with all the master records in hierarchal order. The lowest level issue specifies what Epics and Stories I need to create. I am putting the Epics in the same master project, but the Stories need to be created in the team project that will be doing the work. When I use the Create Issue action, it has a dropdown list of what project I want to create the issues in. I need to be able to take the project name from the master record in the main project and use it to specify the target project where the stories are the be created.

I don't see a way to turn off the project dropdown on the Create Issue action.

create issue 2.png

How is that master record defined in the main project?
I mean you create an epic in the master project. That's fine. But when you create the stories, where is the field that defines the project that should be placed?

It is a field in the main project and is a Project Picker (single project) control. So the information is there. I don't know how to create an issue and use the field to specify the target project:

project picker.png

On the create project field, enter the following smart value:

{{issue.product jira project.id}}

create project id.png

The only thing you have to make sure, is that the destination project has the specific issue type you are trying to create. E.g. if you are trying to create a story, then your destination project's issue type scheme, must include the story issue type. 

@Alex Koxaras _Relational_  I have tried every possible option, but the Epic is created, but the stories are not. The audit log says there was a JSON issue. I tried the following for the Create Issue project:

{{iissue.product jira project.id}}

{{issue.productjiraproject.id}}

{{triggerissue.product jira project.id}}

{{triggerissue.productjiraproject.id}}

{{issue.product jira project.id.as.JsonString}}

 

None of these work.

@Don Hames most likely you have opened the "additional fields". Try to close them and try again.

0 votes
Answer accepted
Jack Brickey Community Leader Dec 12, 2022

Hi @Don Hames ,

How are you dealing with giving the epic a name in your automation? Are you somehow using smart values. Understanding this will help define the best course of action for your automation rule. If you have a rule that you have created as a starting point please share via a screenshot.

Suggest an answer

Log in or Sign up to answer