Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Query to return all child issues (not sub tasks) where parent custom field = XXX

Natasha Denny
Contributor
February 24, 2019

I'm trying to run a query to retrieve all child issues (not subtasks) where the parent issue has a particular custom field specified. 

I'm using Cloud version of ScriptRunner 

Jira hierarchy is:

  • Initiative
    • Task

Scenario: show me all child tasks where custom field 'stream' for Initiative = XXX

Could anyone help with the query? 

2 answers

1 accepted

0 votes
Answer accepted
Kristian Walker _Adaptavist_
Community Champion
February 25, 2019

Hi Natasha,

Thank you for your question.

I can confirm that ScriptRunner for Jira Cloud does not provide the same portfolioChildrenOf() and portfolioParentOf() JQL functions that the server version provides in order out of the box in order to search for Portfolio issues as the API to provide this function does not exist in the Jira Cloud as it does in Jira Server.

The only functionality that ScriptRunner for Jira Cloud provides to search for links is the linkedIssuesOfRecursive() JQL function which the plugin provides and is documented here.

This function can search for Issue links but will not be able to traverse the hierarchy provided by Jira Portfolio as this is currently not supported by Jira Cloud.

You can see more detailed information on the differences between the cloud and server versions inside of our documentation page located here.

If this response has answered your question can you please mark it as accepted so that other users can see it is correct when searching for similar answers.

Regards,
Kristian

0 votes
Antoine Berry
Community Champion
February 25, 2019

Hi,

I don't think a standard issue type can be a child of another standard issue type. That being said, if you have scriptrunner plugin, you could use something like : 

issuetype = Task AND issueFunction in linkedIssuesOf("issuetype = Initiative AND stream = XXX")

 Let me know if that helped.

Suggest an answer

Log in or Sign up to answer