Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

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
Community showcase
Published in Apps & Integrations

Partner Webinar Opportunities: January 2022

Hi everyone 👋, I really like the format of the webinar opportunities summary that @Jimmy Seddon posts monthly on the Welcome Centre group. It's a great place to go to check that you didn...

24 views 0 1
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you