Hi All, Is it possible to get the current user and set it on single user picker ? It should automatically appear on the customer portal right away after clicking on request.
I am using this code on behavior , server side script but it is only referring on the agent view (create , edit/view screen ) not on the portal site . Thanks!
import com.onresolve.jira.groovy.user.FormField
import com.onresolve.jira.groovy.user.FieldBehaviours
import com.atlassian.jira.ComponentManager
import com.atlassian.jira.user.ApplicationUser
import com.atlassian.jira.component.ComponentAccessor
def requestorField = getFieldByName("Affected End User")
def currentUserName = ComponentAccessor.getJiraAuthenticationContext().getLoggedInUser().getName()
requestorField.setFormValue(currentUserName)