Forums

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

Automation rules - Trigger issue does not work when linking issue

E R February 12, 2024

So I created an automation rule with the following:

When: Issue created

If: Issue Type equals Epic

Then: Create a new Sub-task

And: Link issue to Trigger issue

 

I would assume the Trigger issue would be the newly-created issue but its not linking the Sub-task to the Epic.

 

Only when I change Trigger issue to Most recently created issue that it works.

Understandably, that might not always work as our project has multiple members and there might be instances where it might be linked to a different issue.

2 answers

0 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.
February 12, 2024

Hi @E R 

I am unclear what problem you are trying to solve.  Perhaps you could explain that to provide some context for the rule, as that will help the community to offer better suggestions.

Until we know that...

Subtasks are normally not added to an Epic; instead they are are added to the Story, Task, or Bug issue types.

And Subtasks are part of an issue, and so are already connected to it.  What is the purpose of also adding a link?

Kind regards,
Bill

E R February 12, 2024

Thanks Bill. Sub-task is just an example, my main issue is more on the automation rule with the "Trigger issue" not working as expected.

 

Let me re-phrase it then using Task. Basically, when creating an Epic, I would like to automatically generate a Task template so users/teams would use that as a reference in creating their own tasks as usually there are no standards.

When: Issue created

If: Issue Type equals Epic

Then: Create a new Task

And: Link issue to Trigger issue

===


Expected results:
I create a new Epic called PROJ-1, then a Task would automatically be created too called PROJ-2. Lastly, I would expect PROJ-1 be linked to PROJ-2.

 

The last part is not working. However, when I use "Most recently created issue" instead of "Trigger issue" then it works.
Screenshot 2024-02-13 at 11.23.06 am.png

E R February 12, 2024

Expected behaviour but the "Linked issues" part is not working when Trigger issue is used as a value:

Screenshot 2024-02-13 at 11.25.45 am.png

Jack Brickey
Community Champion
February 12, 2024

I expect you want to make the task's parent be the Epic rather than linking the task to the Epic. Is that not the desired result? Assuming it is desired here is an example.

IMG_3652.jpeg

 

Like Bill Sheboy likes this
E R February 12, 2024

This is gold, Jack. I am almost there but seems to have a bug in JIRA as it errors out doing this without any error details on the console.
`{"status_code":200,"errors":[]}`

 

Did it work from your end after hitting "Next"?

Screenshot 2024-02-13 at 2.56.17 pm.png

Jack Brickey
Community Champion
February 13, 2024

You chose "same issue type" in the Create issue action component which would equate to an Epic which can't have an Epic as a parent. Please change to Task or Story.

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.
February 13, 2024

Yes, and...

When using the Issue Created trigger, the trigger can fire so quickly that some of the trigger issue data may not be available to the rule.  This can lead to odd symptoms in other rule steps.

The fix / work-around for that is to always add the Re-fetch Issue action immediately after the Issue Created trigger.  This will slow down the rule a bit, reloading the trigger issue data before proceeding.

Like Jack Brickey likes this
E R February 18, 2024

Even when changing to another issue type (not Epic), I still got same error. It doesnt show the error details :(

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.
February 18, 2024

Please post images of your current complete rule and the audit log details showing the rule execution.  Thanks!

Like Jack Brickey likes this
0 votes
Jack Brickey
Community Champion
February 12, 2024

Hi @E R , are you creating a link between subtask and epic? When you create the subtask what parent is being associated? Can you share images of your rule? It may be that you need to refetch data after creating the subtask.

E R February 12, 2024

Hi Jack, thanks. I've uploaded a snapshot on my response to Bill. I hope my explanation there answers some of your questions too.

Suggest an answer

Log in or Sign up to answer