JQL for finding parent of given subtask

Ryan Matos December 9, 2014

Hi,

I'm looking to write field A's value from a subtask to field A on the subtask's parent.  My attempted solution was to add a post function to a workflow transition on the subtask that would "Write field on issues returned by JQL query". However, I couldn't figure out the JQL to return "this subtask's parent".

I couldn't figure out how to use Write field on linked issues or subtasks for this purpose.

I don't claim to be a JQL expert at all, but was unable to find the solution after some internet research.

Any help is greatly appreciated!

Thanks,

Ryan

2 answers

1 vote
Christian Czaia _Decadis AG_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 10, 2014

You should definitely have a look at Jamie's script runner plugin. 

https://marketplace.atlassian.com/plugins/com.onresolve.jira.groovy.groovyrunner

Look for the scripted JQL function 

parentsOf(Subquery)

https://jamieechlin.atlassian.net/wiki/display/GRV/Scripted+JQL+Functions#ScriptedJQLFunctions-parentsOf(Subquery)

Cheers

1 vote
Andrey Markelov
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 9, 2014

Suggest an answer

Log in or Sign up to answer