Creating a script with JQL on Cloud

aviv_eldad
Contributor
January 8, 2023

Hi all,

 

I'm trying to create a script for the JQL query:

"returns all epics in a selected sprint who have child tasks assigned, but none of these tasks is done"

 

The problem is I need to do it in Jira cloud, where I need to use REST API. I read all the documentation and couldn't be able to write a GET request with the JQL.

How can I do that?

1 answer

1 vote
David Bakkers
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.
January 8, 2023

Hello @aviv_eldad 

Put simply... you can't.

JQL can't do recursive / nested queries, so it can only find the epics that have child tasks, but can't utilise any characteristics of those child tasks in the same request. You need a third party tool like ScriptRunner to perform a recursive search.

aviv_eldad
Contributor
January 8, 2023

Hi @David Bakkers ,

I tried to fo it in scriptrunner,  the problem is I'm on cloud, so all the features I know from jira server does not apply here. 

I read the documentation of scriptrunner for cloud, but I didn't manage to write a script to do these search (and it should not be a hard one)

David Bakkers
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.
January 9, 2023

Sorry, but I'm really not sure what you're talking about, as ScriptRunner works more or less exactly the same in Jira Cloud as it does in Jira Server. Just do a basic Google search for 'jira scriptrunner epic child issue' and you'll find dozens of examples of exactly how to do it.

Another such add-in that provides similar functionality is JQL Search Extensions for Jira Cloud

Good luck on your learning journey

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events