Link to Trigger issue not working

Dan Snell July 1, 2024

 

 

In taken a look around the previous questions, but not been able to find a fix that works for me.

Im using JSM Cloud.

I have an automation rule with the following;

Every day, create a new issue

Then create a new task if a certain label is present

Link that task to the trigger issue

... this doesnt work.

 

If I use "Link issue to Most Recently Created Issue" is DOES work. The caveat being, if I then run the rule again (even hours later) then two tasks are created, one links to the new ticket, and one links to the old ticket.

 

 

4 answers

0 votes
Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 1, 2024

Hello @Dan Snell 

What are the details of the Schedule Trigger? 

To use the Link To Trigger Issue, there must be an issue actually identified in through the Trigger of the rule. For instance when the trigger is Issue Transitioned, the issue that was transitioned is the Trigger Issue for that rule.

When you use a Scheduled trigger, the only way to have a Trigger issue is if the Scheduled trigger retrieves issues with a JQL. If your Scheduled trigger doesn't include a JQL then there is no "trigger issue".

When you use "most recently created issue" that means the issue most recently created within the same rule execution. So each time you run the rule the first issue is created by the rule, and if the branch executes to create the second issue then that would be linked to the first issue created in the same rule execution.

What exactly are you trying to do with the branch?  Are you trying to review the Labels added to the issue you first created in the rule, and then take some action based on that? Or are you trying to look at other "Check Sensor Health" issues in the project? Can you walk us through an example of what you are trying to accomplish with some example data?

Dan Snell July 1, 2024

@Trudy Claspill the scheduled trigger is set to create a new "Check Sensor Health" issue every day (mon - fri) at 4am. These are reminders for daily tasks which my team need to accomplish.

The Labels attached to the issue, represent customers who we need to perform these checks against.

So, when the primary Check Sensor Health issue is created. I want Tasks to be created, based on what labels are used, and those tasks are then linked to the primary issue.

 

I hope that makes sense :)

0 votes
Mikael Sandberg
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 1, 2024

Since the automation is a scheduled one the trigger issue will not work. You would have to break the branch part out to its own automation for it to work. The automation would trigger on issue create and then you can use everything from If: Issue matches JQL and down.

Dan Snell July 1, 2024

Ok, Iwill give that a go. Break it out into two rules. One to create the "Check Sensor Health" issue. A second rule to create the Tasks and link to the primary issue.

Dan Snell July 1, 2024

I tried creating two rules. Rule 1 works, its very basic. Rule 2.. doesnt. No errors or anything in the audit log.

image.png

Dan Snell July 1, 2024

Ok, ive got rule 2 to create the Task now... still not linking.

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 1, 2024

That is because at the point you are trying to link the issue it is the trigger issue that is in focus. Using the Create Issue action does not change the focus of the rule to the newly created issue. As the rule is currently written, with the focus still on the trigger issue, change the Link Issue action to link to the Most Recently Created Issue. That will create a link between the trigger issue and the newly created issue.

0 votes
Dan Breyen
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 1, 2024

Hi @Dan Snell would it be possible to attach some screenshots of your Automation?  Sometimes the Automation pros around here (I'm not in that bucket yet, but trying) can check out what's going on.  Or people like me can try to replicate the issue.  I'm pretty sure I used Link to Trigger issue and it works for me.

I'm not doing the create every day part.  

Also, have you possibly searched Atlassian's Jira site for possible issues?

Hope that helps.

Dan Snell July 1, 2024

Hi @Dan Breyen thanks for the quick response. There should be a post ive just added with a screenshot. Yup, already taken a look around community posts etc. Tried several options, but nothing seems to work.

0 votes
Dan Snell July 1, 2024

Here is the automation rule (I couldnt add it to the main post for some reason)

image.png

Dan Breyen
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 1, 2024

you read my mind!  

Suggest an answer

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

Atlassian Community Events