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
It looks like you're new here. Sign in or register to get started.