You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
Hello,
As long as I'm understanding your use case, I believe this script will work for you. :)
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.issue.ModifiedValue
import com.atlassian.jira.issue.util.DefaultIssueChangeHolder
def customFieldManager = ComponentAccessor.customFieldManager
def optionsManager = ComponentAccessor.optionsManager
def 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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.