We have a field called "Incident Owner" that we want to pre-populate with the current user's name on the create screen.
We have Adaptivist's Behaviours plug-in, but I'm having difficulty putting together an Initialiser that works.
Any help would be much appreciated!
Community moderators have prevented the ability to post new answers.
Please try this and let me know if it works.
import com.atlassian.jira.component.ComponentAccessor
def incidentOwner = getFieldById("customfield_12345")
def currentUserObj = ComponentAccessor.getJiraAuthenticationContext().getLoggedInUser()
incidentOwner.setFormValue(currentUserObj.name)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.