Per Atlassians support documentation they state the maximum objects returned for an AQL query using the branch feature in Jira Automation is 50 objects. https://support.atlassian.com/cloud-automation/docs/jira-automation-branches/
I need to run an automation to mark devices inactive or active based on a last check in data attribute as our MDMs (intune/Jamf) don't track this very well.
Has anyone come up with creative ways to query through or batch assets objects so you can have an automation work on more than 50 objects?
Welcome to Atlassian Community!
What you could do is break the automation into two, the main one does the lookup and then you use the For each smart value loop that calls the second automation that does the actual work on the object.
This is a great idea! Will give a shot and let you know :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Do keep in mind the rule execution monthly limits. If you are executing a second rule for each object that will increase your Automation Rule usage.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Mikael Sandberg
This worked great! Do you have any suggestions on how to scale this to look up more than 500 objects?
Context:
We currently have less than 500 windows devices and less than 500 mac devices. But approaching 500 on each. I can break down each object lookup by device to keep it under 500, but eventually we will naturally have more than 500 objects of a type. Do you have any suggestion for how to batch these to handle more than 500? Or will I just have to find ways to segment them via AQL.
Thanks for the shoutout @Trudy Claspill I'll run it biweekly which should keep the usage low.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You would have to find a way of segmenting them, unfortunately.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
What is the point of having two rules @Mikael Sandberg ? How does that address the Lookup Object limitation of 50 objects?
Ah, I see. I got lost with my brain multi-tasking.
The 50 limit is on the Branch on AQL, while with the Lookup Objects you can get 500 objects.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
For anyone else who encounters this same question/problem. I solved it via the suggestion of two automation flows. As this used the Lookup Objects action it can do 500 objects at a time and sends them 1 by 1 via web request to the 2nd automation to update objects when needed.
My Usecase: Change an Object Attribute in Jira Assets if the checking time exceeds 30 days.
Flow 1:
For each config:
Send web request config:
Note: The header used to include the secret is 'X-Automation-Webhook-Token'.
Flow 2:
I couldn't get an IF/ELSE condition to work in here so i opted for different branches to check for each AQL statement.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Jeffrey Hagstrom _E_
Welcome to the Atlassian community.
Can you refine the AQL to return a subset of the objects (50 or less)? If so, you could set up multiple branches, each with a slightly different AQL to each operate against a discrete subset of the objects.
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.