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.
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?
@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 :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Here is the automation rule (I couldnt add it to the main post for some reason)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
you read my mind!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.