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
Asked in Jira Service Desk

Calling all Insight users, we need your help!

Hello Insight users,  As part of our (Mindville's) acquisition by Atlassian, our training team is looking to build some new Insight training materials. It would really helpful if you can ...

97 views 1 0
View question

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