Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Getting all worklog from subtasks / issues belonging to an epic by JQL + ScriptRunner

Dirk Bromberg
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.
February 19, 2019

Hello,

my idea is to have one query to get the total worklog for an epic by this query:

issueFunction in linkedIssuesOfRecursive("issue = ROAD-166", "relates to") OR issueFunction in subtasksOf("issueFunction in linkedIssuesOfRecursive(\"issue = ROAD-166\", \"relates to\"") AND issueFunction in aggregateExpression("Total Worklog for all Issues", "TimeSpent.sum()")

But this won't work because I don't know how to escape the query inside the query.

 

Ideas? Sugesstions?

Dirk

1 answer

Suggest an answer

Log in or Sign up to answer
0 votes
Ignacio Pulgar
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.
March 19, 2019
I'd try substituting the escaped double quotes with single quotes. If that didn't work, then I'd try this:

Create a filter named Related with the JQL within your subtasksOf funcion.

Once you have that chunk of JQL saved as said filter, substitute that part in your original query with "filter = Related".

Therefore, your query would finally be:

issueFunction in linkedIssuesOfRecursive("issue = ROAD-166", "relates to") OR issueFunction in subtasksOf("filter = Parent") AND issueFunction in aggregateExpression("Total Worklog for all Issues", "TimeSpent.sum()")
TAGS
AUG Leaders

Atlassian Community Events