The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

illegal.argument exception

Andrew Striletskyi
Contributor
February 21, 2018

I have a part of script . On Jira 7 this script succesfully working , but in jira 6.4 I see an error illegalArgument exception (in line with "def PriorityQueue") . Code: 
How to fix it?

class Agent {

ApplicationUser user;

int issueCount;

long lastAssignedTime;

}



def groups = ComponentAccessor.getGroupManager() as GroupManager

def agents = groups.getUsersInGroup("jira-software-users")







def userManager = ComponentAccessor.getUserManager() as UserManager

def user = ComponentAccessor.jiraAuthenticationContext.loggedInUser

def jqlQueryParser = ComponentAccessor.getComponent(JqlQueryParser.class)

def searchProvider = ComponentAccessor.getComponent(SearchProvider.class)









def PriorityQueue<Agent> agentPQ = new PriorityQueue<>(agents.size(), new Comparator<Agent>() {

@Override

int compare(Agent o1, Agent o2) {

if(o1.issueCount == o2.issueCount){

if(o2.lastAssignedTime == o1.lastAssignedTime){

return o1.user.name.compareTo(o2.user.name)

}else{

return o1.lastAssignedTime.compareTo(o2.lastAssignedTime)

}

}else{

return o1.issueCount - o2.issueCount

}

}

})

 

0 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

TAGS
AUG Leaders

Atlassian Community Events