How do I copy the subtask parent id to a custom text field in the subtask using script runner
The main bit of code you need is simply
issue.getParentObject().getKey()
For writing it away, there's a good guide to setting most types of field at https://library.adaptavist.com/entity/update-the-value-of-custom-fields-through-the-script-console
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.