Update select list with $AJS

Hello !

I’m trying to set a value for a custom field i’ve added to the create issue screen using AJS object
the custom field is of type : “Select List (single choice)
to set the value i’m using the below commend (10020 is the id of one of the options)


i’ve also tried to set the name and not the id but it’s not working

but both does not work, once i save the new issue the value of the custom field is empty
what i’m doing wrong ?
this comment does works on a “simple” fields like “summery” field which is a input of type text


ID’s are generally strings, so I’d expect .val('10020') and not .val(10020). Hard to say without seeing the actual HTML you’re trying to manipulate.