Automation - Set "Epic Link" on Story to Epic created in the same automation

Jakob Agelin
Contributor
January 5, 2021

Hi!

 

What I want to do is to change the Epic Link property of a Story created within an automation, to be the ID of a cloned epic in the same automation.

In below the automation is triggered manually, to Clone a given epic and then we fetch the issue.key of that Cloned Epic, place it in a variable and set the story with that variable. However, according to the logs the {{createdissueID}} is getting the correct ID but when setting Epic Link on the Story, it renders an empty log and the story is created without any Epic Link.

What am I doing wrong here and is it possible?

Thanks!

/Jakob

 

JIRA.png

2 answers

1 accepted

4 votes
Answer accepted
Sandesh Shetty
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.
January 5, 2021

@Jakob Agelin 

You can use smart value 
{{#createdIssues}}{{key}}{{/}} for the epic link field. Please find the bellow screenshot for the same.

epiclink.png

Jakob Agelin
Contributor
January 5, 2021

This was exactly what I was looking for. Difficult to find this answer anywhere.

 

Thanks,

Jakob

Marc Isikoff
Contributor
June 21, 2024

If I do this I get: Error parsing template: Mismatched start/end tags: null != in template-92d62ab7-91f9-4fca-ad6b-6abf31c20d7d:1

I have this as {{mycreatedvar}}{{key}}{{/}}

0 votes
Yvan Martin
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 19, 2021

HI Jakob,

Developer from Automation here.

I'm glad you solved your issue using createdIssues.

When using the "Most recently created issue" branch, the smart value of that newly created issue will be accessed as {{issue} for components in that branch. So in your case {{issue}} or {{issue.key}} should have worked. createdIssues is another way to access that key without using that branch.

Screen Shot 2021-01-20 at 9.49.40 am.png

Cheers.

ihe
Contributor
November 2, 2022

Hi everyone. I see that the initial question was solved through using other smart values. However, I really would like to understand why the initial setup that @Jakob Agelin provided description of did not work. 

 

I see several other threads here in Community (see links below) that describe using automation-created smart value to pick up the epic link to then insert it in newly cloned children. So I have been testing that same setup as Jakob describes above, where I get the exact same end result (meaning):

  • I clone the epic
  • create a smart variable called varNewEpic
  • I have ensured that the smart variable actually picks up correct epic by using Log Action and print it out in the log (verified OK)
  • then I insert same smart value into epic link field in cloned children
  • (please note that all actions are in the one and same automation)

And like Jakob described, the epic link that is inserted into the cloned children is the original epic link, not the one picked up and proved correct in the smart variable varNewEpic. 

I understand that I can use the setup above (although I so far have not been able to make it fly), but I really would like to understand why my varNewEpic is not inserted in the cloned issues

Could you please elaborate @Yvan Martin ?

 

 

https://community.atlassian.com/t5/Jira-Software-questions/How-to-clone-Epic-with-children-by-using-automation-rule/qaq-p/1819811

https://community.atlassian.com/t5/Jira-Software-questions/clone-an-epic-including-its-child-issues/qaq-p/2091431

Like Lisa Wagner likes this
Brian Ward November 2, 2022

I am having literally the EXACT same issue. So, that's two people interested! What are the odds

Like # people like this
Marc Isikoff
Contributor
June 21, 2024

I am trying to do this but have no need to clone an epic - I just want to find an epic and get it's key into a variable so I can assign it as the epic link to a story.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events