I use this script https://scriptrunner.adaptavist.com/latest/jira/recipes/behaviours/subtask-default-fields.html.
I can copy all other fields but can't copy custom field (label). This filed is empty.
I know it's a bit later but I ran into this issue too so for anyone else googling how to do it.
The scriptrunner page says to use:
getFieldById(LABELS).setFormValue(parentIssue.labels)
but you actually need to use:
getFieldById(LABELS).setFormValue(parentIssue.labels*.label)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.