Degraded performance Customers may experience intermittent errors using Community search. Our platform vendor is investigating.
It depends a little on which kind of script you want to do it in (Post function, behaviour, etc.), but it should be as simple as
import com.atlassian.jira.component.ComponentAccessor def userManager = ComponentAccessor.userManager def someUser = userManager.getUserByKey("someone") issue.assignee = someUser
to get a specific user from the DB. If you want to get the user from a user-picker custom field, you'd do something like
def cf = ComponentAccessor.customFieldManager.getCustomFieldObjectByName("My User Picker") def someUser = issue.getCustomFieldValue(cf) issue.assignee = someUser
Again, if you can provide some detail about when you want the custom field to be set (i.e. as part of a workflow, or automatically on the issue's create/edit screen), I could provide some more specific guidance.
I want to do a similar workflow:
Create issue ==> approved by manager ===> apporved by manager ===> assigned ===> in progress => resolved
I am acctually blocking the assignment of the issue to the manager so that he validates and then do the same with the manager.
NB: I have a table on my DB with the name od manager and manager
def cf = ComponentAccessor.customFieldManager.getCustomFieldObjectByName("supp")
def someUser = issue.getCustomFieldValue(cf)
issue.description = someUser
This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.Read more
Hey Atlassian Community! Today we are launching a bunch of customer stories about the amazing work teams, like Dropbox and Twilio, are doing with Jira. You can check out the stories here. The thi...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs