I need a script to do the following:
Check if ticket is assigned to a user - I have this piece
-- If not, check that the user has the assignable user permission
----- If they do, assign it to the current user
if (issue.fields.assignee != null) {
//Set assignee here,
I am hoping there is something I can do in scriptrunner, and also to run it under the current user using script runner