Automation: How can I use but *limit* round-robin issue assignment?
Asked by Michael Labrecque-Jessen:

We use Jira Automation's built-in Assign Issue action, and have it configured to round-robin assign out to members of a specific group, which works great.

Sometimes we get into high-volume scenarios, and the team is asking about ways to limit the amount of issues that get assigned at a time. For example, only assigning 5, regardless of how many are in Unassigned and waiting. Next time, 5 more.

I'm hitting a wall in finding a creative way to do this. I can't find any way to *limit* a JQL result---our normal assign automation uses the JQL filter for further action steps, but with no way to limit the results, I don't see how this is possible.

I can use a Web Request to query the full JQL via the API, and use that to limit the results, and get back a limited list of issues: {{webResponse.body.issues.key}}

But---how do I assign **those** issues round-robin? The Assign Issue action doesn't seem to take any input, so I can't direct issues into it. Maybe I could use the API to assign instead, but then I can't do round-robin.

I suppose I could use the API approach to get limited results and then do another API-based bulk edit, like add a label which another automation can pick up on to *then* do round-robin assignment, but that feels so overly complicated. Am I missing something?


Answers:
author: Bill Sheboy
body: Hi [@Michael Labrecque-Jessen](/t5/user/viewprofilepage/user-id/5114584) -- Welcome to the Atlassian Community!

As Mikael described, there is no built-in way to do this. I looked and did not find an open suggestion for this feature in the public backlog, so you may want to add one.

In the meantime...

A possible, convoluted workaround *which I have not tried* is this:

* automation rule 1
  * use a separate, user group to drive round robin assignment in the rule
  * in the rule, when a specific user is assigned to their 5th open issue, use the REST API with the Send Web Request action to remove them from the group, and so prevent future assignment
* automation rule 2
  * when an issue is completed and drops the assignee's count below 5 issues, call the REST API to re-add them to the group

This approach might have latency issues with the time to remove / add the user with the group, so please test if you want to try this one.

Kind regards,  
Bill

comments: author: Michael Labrecque-Jessen
body: Interesting idea. For now, rather than my main automation assigning the tickets, it applies a label, which another automation is looking for, and that one can use the native Assign Issue action. Feels very roundabout!


author: Mikael Sandberg
body: Hi [@Michael Labrecque-Jessen](/t5/user/viewprofilepage/user-id/5114584),

Welcome to Atlassian Community!

There is no option to limit the returned result from your JQL, one option besides the API calls would be to create a version of dynamic looping as described in [this article](https://community.atlassian.com/t5/Jira-Service-Management-articles/How-to-create-dynamic-looping-in-Automation-for-Jira/ba-p/2293077). Instead of using the value from the issue you could have a smart value that sets it, that way you could go in and modify that if you need to change how many issues should be assigned at the time.

comments: author: Michael Labrecque-Jessen
body: Thanks for this link! Something to investigate.


Tags: cloud

jira-service-management

jira-service-management-cloud