Scriptrunner Assign to Role Member error log

Daniel Wong June 30, 2014

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:

https://answers.atlassian.com/questions/240849/assign-issue-to-project-role-jira-misc-workflow-ext

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)

5 answers

1 accepted

0 votes
Answer accepted
Daniel Wong July 15, 2014

Upgraded to Scriptrunner 3.0 with JIRA 6.3 and this error seems to have disappeared.

0 votes
Daniel Wong July 3, 2014
I see. Makes sense. Unfortunately all the stack traces of this error end in the same (Unknown Source) and doesn't get to "Caused by". Is there any other information I can provide to help?
0 votes
JamieA
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.
July 3, 2014

I truncated the stack trace, because there was nothing useful in it and it tends to put people off looking at the question, and scrolling down to any answers.

0 votes
Daniel Wong July 2, 2014
  • JIRA 6.2.7
  • Plugin 2.1.17 (Anxiously waiting version 3 :D )

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)

0 votes
JamieA
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.
July 1, 2014

What version of jira and of the plugin?

When you say "fixed ordered list", by what would it be ordered?

There should be more to this stack trace, like a "caused by" section...?

Suggest an answer

Log in or Sign up to answer