Hi, we're having some problems with script runner's Assign To Role Member post-fucntion. We're using it to assign to a particular role member as part of the transition. The post-function seems to throw an error everytime we transition. It actually assigns the issue correctly, but fills up our logs with an error.
Additionally, according to this answer:
JIRA's behaviour is unpredictable when choosing the "first role member". I had a look at the actual groovy script and it's just choosing the first item of the list, which makes sense, however, it seems the list it gets doesn't always stay in that order.
Do other people get the error log when using script runner's post-function?
Does anyone know how to get a fixed ordered list of role members from JIRA or is that not possible?
Any help would be greatly appreciated
Below is the error log (I removed the username and ip for security reasons):
2014-07-01 09:54:44,358 http-bio-8080-exec-10 ERROR username 594x9853x1 s0m5v0 x.x.x.x,x.x.x.x /secure/CommentAssignIssue.jspa [onresolve.jira.groovy.GroovyFunctionPlugin] Script post-function failed on HRSGPYR-1: com.onresolve.jira.groovy.canned.workflow.postfunctions.AssignToRoleMember java.lang.NullPointerException at com.onresolve.jira.groovy.GroovyRunner.run(GroovyRunner.java:53)
About the fixed ordered list, I ran some tests and it seems that JIRA auto-sorts role members in alphabetical order. My assumption was that it would be ordered by when the role member was set.
Example is: User A, User B, User C are set in the 'developer' role, JIRA automatically sets User C as the first on the list rather than User A. Strange but at least I know how to move around with this list now :)
Weird, somehow the additional stack trace wasn't pasted here. However, there's no "Caused By" section in the stack trace which I find strange as well. Stack trace is too long to paste so I've put it into a txt file:(stack trace.txt)
Badges are a great way to show off community activity, whether you’re a newbie or a Champion.Learn more
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG