Set value Select Field Lists (single choise)

Originally asked by Andrey Miranda on 16 October 2020 (original question)


some one know how to set a value of a Select Field Lists (single choise) field .

for example i need to set a default value when sync a ticket y try the next example but i have the error that property value is not accept.

If you have some suggestions tell me

if (firstSync ) {
  issue.customFields."Issue Escalated From".value = "Exalate"
}

Answer by Andrey Miranda on 16 October 2020

this is the solution :

 if (firstSync ){ issue.customFields."10012".value = "Exalate" }

Comments:

Juan Grases commented on 16 October 2020

Good news you found a solution. Normally you should also be able to use the custom field name. Are you sure you use the exact name, case sensitive? Also the problem could be that you have many CFs with the same name, in that case using the ID is the way to go.

Andrey Miranda commented on 16 October 2020

thanks i think is that i use the same custom field with different context and with the script search with the name is difficult to find

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.