Scriptrunner Assign to Role Member error log

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

This widget could not be displayed.

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

This widget could not be displayed.

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...?

This widget could not be displayed.
  • 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)

This widget could not be displayed.

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.

This widget could not be displayed.
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?

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Tuesday in Jira

What modern development practices are at the heart of how your team delivers software?

Hey Community mates! Claire here from the Software Product Marketing team. We all know software development changes rapidly, and it's often tough to keep up. But from our research, we've found the h...

140 views 1 3
Join discussion

Atlassian User Groups

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!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you