Could you provide an example of how I can copy a field value from the Parent Issue to the linked Child Issue using JQL in the copy post function.
Thank You!
Hello Nannette
JQL is just a query language; it will not do anything to your tickets; it will just provide you lists of tickets, depending on your search criteria.
To copy a custom field value from parent to child in a post function you will need a Jira plugin; this operation is in facts not possible with just the out-of-the-box software.
There are several plugins that can help you with this. Maybe you already have one of them installed in your Jira.
Can I do the copy using Power Scripts, we do not have script runner
Hello @Nannette Mori ,
Yes, you can copy a value from parent to child. Do you mean that you want to copy the value of a custom field from task to subtask? If so, then you could write a code like this:
#{your custom field name} = parent.#{your custom field name}
If you want to take a linked issue then use the allLinkedIssues method to get issues and then copy values. For example, like this:
for k in allLinkedIssues(key) {
#{your custom field name} = k.#{your custom field name}
}
It looks like you're new here. Sign in or register to get started.