Hi,
I working with transition which creating custom projects with ScriptRunner. I trying to get username from Multi User Picker and add this people to role "Administrators". I have problem with passing datas. My code:
def Key = customFieldManager.getCustomFieldObject("customfield_17306")
def KeyValue = issue.getCustomFieldValue(Key)
def project = projectManager.getProjectObjByKey("$KeyValue")
def projectRole = projectRoleManager.getProjectRole("Administrators")
def actors = ["174373","email-tasks"]
projectRoleService.addActorsToProjectRole(actors,
projectRole,
project,
ProjectRoleActor.USER_ROLE_ACTOR_TYPE,
errorCollection)
and this working, beacuse actors are in "". When i trying get values from custom fields, like this:
def Admin = customFieldManager.getCustomFieldObject("customfield_17303")
def AdminValue = issue.getCustomFieldValue(Admin).usernameI have this this format: [abc, test123, test], so without "". I must pass this to actors variable with "". Do you have idea what i can take data with "" or add this later? For all characters in username's.