Forums

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

How can I add the trigger issue as my parent for issues created from automation?

Andy Ades April 22, 2020

I'm using a next-gen project with Automation for Jira (cloud). I have a rule setup for whenever an epic is created to trigger creation of new issues (not sub-tasks) with certain fields set. I'm trying to set the trigger issue as the Epic of the newly created issues, but since "parent" isn't available until an Epic is linked to an issue, I'm unable to figure out how to properly do this. Is this possible in next-gen?

 

My advanced code block is:

{
"fields": {
"parent": "{{triggerIssue.key}}"
}
}

The error I get in the audit logs is:

Error creating issue: data was not an object (parent)

 

2 answers

1 accepted

1 vote
Answer accepted
Petter Gonçalves
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 24, 2020

Hello @Andy Ades

Sorry to hear you are facing this problem.

Indeed, Next-gen projects use a different mechanism that does not include the "Epic link" field to link Epics to issues, so the Automation rules are not able to recognize them yet.

Basically, this happens due to the fact that Next-gen projects use single entities for each project scope (Epics, status, Sprints, etc), so different fields and link types were created to link Next-gen Epics.

We have the following feature request to allow the Epic link to be recognized in Automation rules:

Setting epic link / parent link in next gen projects is broken in cloud

Unfortunately, I'm afraid we don't have a way to make it work with Next-gen projects at this moment, so I recommend you keep an eye on the feature request and move your issues to a Classic project in case you really need this functionality.

Let us know if you have any questions.

Andy Ades April 24, 2020

@Petter Gonçalves - appreciate the response. There are enough benefits for us to keep the project as next-gen for now. We'll manually update the parent link once the issues are created. We'll keep an eye on the feature request too. Thanks!

Like Petter Gonçalves likes this
Petter Gonçalves
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 24, 2020

You are welcome @Andy Ades

Have a nice weekend and let us know in case you have any other questions.

Like Andy Ades likes this
Charles Amschel June 22, 2021

@Andy Ades If you're still looking for a solution, a user in a comment on another topic posted a solution that's pretty simple. That topic is called "Setting next-gen Epic parent in jira automation". Here's a link.

https://community.atlassian.com/t5/Team-managed-projects-questions/Setting-next-gen-Epic-parent-in-jira-automation/qaq-p/1263233#U1731732

The useful comment is dated Mar02, 2021.

jeroen_wilmes
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 30, 2023

Is there any new view on this? 
"so I recommend you keep an eye on the feature request and move your issues to a Classic project in case you really need this functionality." is not really what I'm looking for.

The solution mentioned by Charles is dealing with Epic - task. I'm looking for "initiative" - Epic.  THere fore I need to fill the Parent link field (customfield from Advance Roadmaps) with the value of the key of the trigger issue.

jake.nelken@datadoghq.com
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!
September 25, 2024
0 votes
jake.nelken@datadoghq.com
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!
September 25, 2024

You can try this format out (taken from the API docs)


https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issues/#api-rest-api-3-issue-post

{
"fields": {
"parent": {
"key": "{{triggerIssue.key}}"
}
}
}

Suggest an answer

Log in or Sign up to answer