I am looking to do round robin assignment using Automation Lite for Jira or possibly Scriptrunner for Jira Server 8.13
I set up a general role that holds all assignees for round robin assignment. I also set up user roles representing skillsets. Assignees may be in more than one "skillset" role.
The 11 minute and 5 minute rules work well. The issue is that when a match is not found, instead of returning back to the user that wasn't a match, it moves on to the next person. This means a lot of people are getting skipped and people with more skillsets are getting more assignments.
Any idea how I can solve for this? I also tried balanced workload but it did not seem to do anything and seemed to assign the same people over and over for some reason.
Hi @Jillian Menoche Welcome to Atlassian Community!
You can achieve this using Script Runner , kindly check below link for round robin :-
https://library.adaptavist.com/entity/round-robin-assign-issue-to-users-in-a-certain-project-role
Thanks
Thank you for the quick response!
I should mention I saw this link and pasted the code in but couldn't get off the ground as it gave me the following error at line 17: can't find method projectRoleManager.getProjectRoleActors(projectRole, issue.projectObject)
any thoughts on what may be happening there? Thanks again!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Jillian Menoche I have tested the same script on my machine. It's working fine, not giving any error message. You have to insert this in Scripted Post function.
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.security.roles.ProjectRoleManager
// The role you want assignees to set from
final roleName = 'Administrators'
// If it is true, the assigned issues will be reassigned
final reassignedIssues = true
def issueManager = ComponentAccessor.issueManager
def projectRoleManager = ComponentAccessor.getComponent(ProjectRoleManager)
// Get all of the users associated with the specified project role
def projectRole = projectRoleManager.getProjectRole(roleName)
// Sort the users of the project role using the user key
def users = projectRoleManager.getProjectRoleActors(projectRole, issue.projectObject)
.applicationUsers
.toSorted { it.key }
// There are no users in the specific project role
if (!users) {
log.info ("No users for project role $roleName")
return
}
if (!reassignedIssues && issue.assignee) {
log.info ('The issue is already assigned')
return
}
// Find the latest created issue id that has an assignee
def lastIssueIdWithAssignee = issueManager.getIssueIdsForProject(issue.projectObject.id)
.sort()
.reverse()
.find { issueManager.getIssueObject(it).assignee }
if (!lastIssueIdWithAssignee) {
issue.setAssignee(users.first())
return
}
def lastAssignee = issueManager.getIssueObject(lastIssueIdWithAssignee).assignee
def lastAssigneeIndex = users.indexOf(lastAssignee)
def nextAssignee = users[(lastAssigneeIndex + 1) % users.size()]
issue.setAssignee(nextAssignee)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Doesn't work. No errors but it only keeps assigning to one person.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Peter-Dave Sheehan kindly suggest . Round robin is not working.
thanks
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.