Hello,
I have a Custom field(Multi User picker), is it possible to copy the names of the selected users to a Text Field
Thanks.
As long as I'm understanding your use case, I believe this script will work for you.
import com.atlassian.jira.component.ComponentAccessorimport com.atlassian.jira.issue.ModifiedValueimport com.atlassian.jira.issue.util.DefaultIssueChangeHolderdef customFieldManager = ComponentAccessor.customFieldManagerdef optionsManager = ComponentAccessor.optionsManagerdef multiSelect = customFieldManager.getCustomFieldObjectByName("Users")def users = multiSelect.getValue(event.issue)def value = []users.each{ value.push(it.displayName)}def textField = customFieldManager.getCustomFieldObjects(event.issue).find {it.name == "Field"}def changeHolder = new DefaultIssueChangeHolder()textField.updateValue(null, event.issue, new ModifiedValue(event.issue.getCustomFieldValue(textField), value as String),changeHolder)
You'll need to make this a Script Listener and have it listen on the events you want to check for. For example, I used the 'Issue Updated' and 'Issue Created' events.
Let me know if you have any further questions!
Jenna Davis
It looks like you're new here. Sign in or register to get started.