Hi Team,
is there a way for an automation to find latest date from all the issues that are linked in?
Goal --> for all the bugs I want to see date when that bug caused an incident.
How I'm approaching - I created a custom date field, have Automation to run thru each bug, look at the linked issues, get "created date" for most recent issue and copy it to the "custom field" I created.
I have script runner but I'm really avoiding using it for reason 1) need coding + 2) needs system admin to manage it.
Hello @R
Yes, this could be done with an Automation rule.
What event do you want to trigger the Automation rule? Is this something you need a rule to update all pre-existing issue, and then a different rule to update issues as new links are created?
Does the link type matter? Does the "direction" of the link matter? For example do when looking at a given Bug do you want to consider only the linked issues where Bug "blocks" the linked issue?
To update pre-existing Bug issues where this field the custom field is empty and linked issues already exist you could
- create a Scheduled trigger rule that uses a JQL to look for all the bugs where the custom field is empty, then
- uses a Lookup Issues action to look up the linked issues associated to each issue retrieved by the trigger, ordering the linked issues based on Created
- updates the bug custom field using {{lookupIssues.first.Created}} - that would pull the Created timestamp of the first issue in the ordered results of the Lookup Issues action
Since an element of the trigger JQL is to do that only for Bugs where the custom field is empty that would not help you update the field if more/new issues are linked to the bug.
If you need to update the field on an ongoing basis, you could use the Scheduled rule and eliminate the condition in the JQL trigger that the custom field must be blank.
Or you could write another rule that is triggered by the creation of a new link between an issue and a Bug.
Note that there are limits on how many rule executions you can have in a month, so you may need to consider that before implementing a rule that is triggered by creation of a new link.
https://www.atlassian.com/blog/announcements/cloud-automation-packaging-update
You also need to look at the other limits on automation concerning how many issues can be processed.
https://support.atlassian.com/cloud-automation/docs/automation-service-limits/
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.