Looking to create Epic,Story,Task via automation

Scott Schellhardt March 6, 2024

Hi all, I am looking to set up an automation to perform the following:

Create an Epic 
Create a Story and link to the Epic
Create a Task and Link to the Story

have tried everything I can to make this happen and I am unable to figure it out. I have posted my automation below, please help ! 

Screenshot 2024-03-06 at 3.58.17 PM.png

1 answer

2 votes
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.
March 6, 2024

Hi @Scott Schellhardt 

I believe you may remove that branch on most-recently-created issue, and instead either:

  1. use variables to save the keys as issues are created from {{createdIssue.key}}, and reference them in the epic link and issue linking, or
  2. use the smart value {{createdIssues}} (i.e., note this smart value is plural) and reference the one you need as you proceed, such as {{createdIssues.get(0).key}} or {{createdIssues.get(1)}} https://support.atlassian.com/cloud-automation/docs/jira-smart-values-issues/#--createdIssues--

Also, when you note linking the Story to the Epic, do you mean as a child or as a linked issue?

Kind regards,
Bill

Scott Schellhardt March 7, 2024

Thanks a lot for your input Bill. Do you have an example of an automation set up like this, Variables are very new to me and im not sure I understand how to correctly use them. 

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.
March 7, 2024

No problem; re-reading your original problem, you will not need created variables...

I am assuming you want the Story as child of the created epic, not just linked to it.  Please adjust accordingly to meet your needs. 

I am also assuming that all of the issues are the same project.  If not, adjustments may be needed.

Let's use your rule as a starting point, where I will highlight the changes as deletes with strikeout=, additions as italics, and questions in bold fonts.

  • trigger: manual
  • action: create issue, for your epic
  • condition: summary equals Test (What is the purpose of this condition?)
  • branch:  to most recently created issue
  • action: create issue for the new Story, setting the Epic Link to most recently created issue
  • action: add link to trigger issue
  • action: re-fetch issue
  • action: create issue for the new Task
  • condition: with JQL to test if the issueType = Story (What is the purpose of this condition?)
  • action: add link to most recently created issue

 

FYI...lots of stuff in rule writing takes experimentation to learn, so I recommend also trying test rules in a test project, with writes to the audit log to assess progress.  Those usually will not count against the monthly usage counts (as they do not change issues) and will not impact your "production" projects.  Your Jira site admin will need to create the project, for some types.

Suggest an answer

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

Atlassian Community Events