Auto-assign users in round robin fashion from two separate lists (time-based) with scriptrunner

- May 11, 2021

I'm looking to load balance the assignment of issues in a project based on the 'working hours' of team members located in two different regions (US and EU). I also want to evenly auto-assign created issues in round-robin in accordance to the ordered list of users per region. The auto-assignment should be time-based, where:

  • issues created between 4AM-4PM UTC are assigned in rotation from EU region
  • issues created between 4PM-4AM UTC are assigned in rotation from US region

The list order of users per region is as follows:

  • EU: Liz H -> Gamul D -> Zubair S -> Caitriona K -> Ronan R -> Lior R
  • US: Vincent L. -> Chris D. -> Ian B -> Jennifer L. -> John M. -> Frank G.

I've already tackled a problem like this in an earlier post, where I auto assign users in the "Workers" role in round robin fashion. But in this case, I want to alternate between two user lists purely based on the time of day. What would be the best way to do this referencing the Round Robin Assign Issue to Users in a Certain Project Role script from adaptavist library?

1 answer

0 votes
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 11, 2021

Hi @Ian Balas 

You can do this with Automation for Jira, if you have that add-on installed for server version. If not, there is a Lite (free) version and a Pro (paid) version to try.

Please see this post for some ideas how to do this:

https://community.atlassian.com/t5/Automation-questions/Assigning-round-robin-according-to-the-hour-of-the-day/qaq-p/1651142

Best regards,

Bill

- May 11, 2021

Hi @Bill Sheboy ,

Thanks for the suggestion. We may consider Automation for Jira as we inch closer to moving to Cloud near the end of the FY, but for now we're looking for a solution with Scriptrunner. As I mentioned, in a previous post I was able to edit the round robin script from Adaptavist Library to better suit a use case by one of the projects in our instance, scanning for an unassigned issue and assigning to a user that's part of a rotation of users with the Workers project role (ordered by last name desc). But now I want to take the same script and tweak it so that it'll auto-assign to users in two different roles (EU and US), where the EU users get assigned in rotation from 4AM-4PM, and US users get assigned from 4PM-4AM.

Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 12, 2021

Thanks for clarifying, Ian.  I am not using server version or ScriptRunner, so someone else in the community will need to chime in to help.

__Bill

Suggest an answer

Log in or Sign up to answer