Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,363,014
Community Members
 
Community Events
168
Community Groups

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

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

0 votes
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()")

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events