Forums

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

User adds a new Issue, Automation creates new Epic for the Issue . How to set new Epic in the Issue?

Alex Trebek
Contributor
January 28, 2021

Hello!

I'm having trouble with setting Epic Link via Edit issue automation.

 

For context.

An instance of a Software Project is used for Sales initiatives and Requests to technical departments. With Epics used as Sales initiatives and Tasks as Requests.

If a new Request is related to the existing Initiative, than user creates Task from existing Epic.

But for new Initiatives usually you need to send Request at once. That's why we're trying to add automation by creating Epic if a new Request (Task) is created without linking to the existing Epic.

 

So in the automation rule we have Task as a trigger and Epic created by Create issue action.

Than I'm trying to use Edit issue action to set newly created Epic in Epic link of the trigger. But all available filling options (Current issue, Parent issue, Epic issue, Trigger issue) do not work in this case.

Any tips how it could be done?

 

It feels like a very trivial thing, but I'm only starting.

1 answer

1 accepted

0 votes
Answer accepted
John Funk
Community Champion
January 29, 2021

Hi "Alex" - Welcome to the Atlassian Community!

Is this a Next-gen project? Or a Classic Software project? 

Alex Trebek
Contributor
January 29, 2021

Hello John. Thanks for the response.

This is a Classic Software project.

We need advanced settings for access to Issues and few other options that available only in SW projects. That's why we didn't choose Business project or Next-gen project although the goal is to set up purely operation-type processes across several departments of the company.

John Funk
Community Champion
January 29, 2021

I have tried several different tests and can't figure out a way to update the Epic Link for the originally created issue. 

Maybe @Bill Sheboy has some insights.

The other option would be to have it send you and email with the details and you can manually link 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.
January 29, 2021

Hi @Alex Trebek and @John Funk 

If I am understanding your use case, when an issue is created you want to create an epic and then link the two with epic link.  If that is correct, here is what I did to achieve that:

  • Trigger: issue created
  • Condition: IssueType IN (task, story, bug)   Just some insurance to reduce errors.
  • Action: create issue...
    • Setting the IssueType to epic
    • Copying some fields from the trigger issue (current issue)
    • Setting the Epic Name to something, probably also from the trigger issue (current issue)
  • Action: edit issue using JSON edit under advanced
{
"fields": {
"Epic Link": "{{createdIssue.key}}"
}
}

 

Best regards,

Bill

Like # people like this
Alex Trebek
Contributor
January 29, 2021

@Bill Sheboyyou understood the scenario correctly.

It works! Thank you very much!

Like # people like this
John Funk
Community Champion
January 29, 2021

Thanks, Bill!  I forgot about trying with the JSON edit!

Like Bill Sheboy likes this
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.
January 29, 2021

Yup, and {{createdIssue}} and {{createdIssues}} solve a lot of rule challenges.

Now...if we could only edit variables after created, and have all the fields in Lookup Issues, and...  ;^)

__Bill

Like John Funk likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events