Trying to create some ScriptRunner groovy scripting on CLOUD to loop through the subtasks of an issue and delete some of the subtasks basked on their status.
I found the server RESTAPI call to pull back the subtasks, but it doesn't work on CLOUD.
Server call: /rest/api/2/issue/ISSUE-144/subtask
Am I missing something here? Is there a new way to loop through subtasks on Cloud?
Hi Tom,
The REST API is different for Server and Cloud:
Therefore, for Cloud, you can try the following code to retrieve subtasks of an issue:
def subtasks = get('/rest/api/3/issue/ISSUE-144').asObject(Map).body.fields.subtasks
I hope this helps!
Kind regards,
Helmy
And from there iterate through them. If you want, I can create a simple draft of the script.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.