I am trying to add the current user of the workflow action to a custom Single User Picker field using the "Set Field Value to constant or Groovy expression" post function.
We are using Script Runner version 2.1.17 with JIRA version 6.2.4, build # 6261, Our IT support is busy preparing to upgrade our JIRA instance to version 7.x, for over 1700 active users, so will not be able to assist for the next several weeks.
I tried using the snippet:
com.atlassian.jira.component.ComponentAccessor.getJiraAuthenticationContext().getUser()
as documented in https://innovalog.atlassian.net/wiki/spaces/KB/pages/138353228/Getting+the+current+user+from+Groovy
but when I have the Value Type - Groovy Expression I receive:
"Sorry, we had some technical problems during your last operation"
with the cause:
java.lang.NoClassDefFoundError: Could not initialize class org.codehaus.groovy.runtime.InvokerHelper
So I assume there is more to the groovy expressions I need to include in the Value box.
I am not new to JIRA as I am responsible for over 35 workflows and have used many examples I have found online over the years to incorporate requested workflow operation, but I am stuck on this one. Unfortunately I am NOT a software developer and have no experience with creating scripts.