JQL: trying to find all tickets from epics with a given dueDate

Mircea Craciun June 4, 2024

Hello,

 

I need to grab all remaining tickets from epics that have a DueDate less than a given dead line. From my searches I found similar questions from a few year ago using `allIssuesInEpic` and I am using it like below

issue in allIssuesInEpic("duedate <= '2024-07-01'") order by created DESC

but I am getting the following error:

Unable to find JQL function 'allIssuesInEpic(duedate <= '2024-07-01')'.
Am I using that wrong or is there another way to do it nowadays?

Thank you.

3 answers

1 accepted

0 votes
Answer accepted
Hannes Obweger - JXL for Jira
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
June 4, 2024

Hi @Mircea Craciun,

unfortunately, this is trickier than one might think; as a hierarchical query, it would really require some kind of "join" or "subquery", which isn't available in plain Jira/JQL.

A few directions forward:

  • If it's a one-off thing, you could first query the relevant epics, and then use the keys of these epics in a second query, in an "parent in (KEY-1, KEY-2, ...)" clause.

If you want to run your search dynamically, without manually "stitching" two queries together, you'll need extra tooling:

  • You might be able to use Jira Automation to "propagate" epic information down to the epic's children, and then use the respective field(s) on the children to include them into your filter. Obviously, this will add a fair bit of complexity to your system.
  • There's different apps from the Atlassian Marketplace that can help with that. First, there's a number of apps that extend JQL by additional functions, including hierarchy-related functions. AFAIK, the syntax that you found is from Scriptrunner, but there are others, too.
  • Alternatively, you could try one of the more hierarchy-focused apps from the Marketplace. These apps typically have their own ways of figuring out parent/child relationships between issues, and provide more powerful ways of searching through issue hierarchies. I myself work on such an app, in which your use case would be easy to solve - I'll provide more details below.

Hope this helps,

Best,

Hannes

Hannes Obweger - JXL for Jira
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
June 4, 2024

Just to expand on the last point, this is how this would look in the app that my team and I are working on, JXL for Jira. Put simply, you'd create a sheet with all issues that are potentially relevant to you, enable the default issue hierarchy (that's just one click), and then use JXL filtering capabilities to narrow down to the issues that you care about:

epic-due-date.gif

Once you have your list of issues, you can work on these directly in JXL (much like you'd do in e.g. Excel or Google Sheets), trigger various operations in Jira, or export them for further processing.

Any questions just let me know!

Mircea Craciun June 5, 2024

Am trying this now, but we only have Due Date on the epic. I did a grouping by parent, but then I have a bunch of epics "with no parent" of course. If I remove the epic from scope, then due dates are not shown on parents. What would be a better grouping and scope for this case?

Hannes Obweger - JXL for Jira
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
June 6, 2024

Hi @Mircea Craciun

thanks for getting back to me! 

What I did in the above clip is

Mind giving this a try?

If this doesn't work, kindly reach out to us at https://jxl.app/support so that we can look into this in more detail.

Many thanks,

Best,

Hannes

Mircea Craciun June 6, 2024

@Hannes Obweger - JXL for Jirathat worked, thank you.

Can we also do sum-up per epic?

What about per assignee?

Thanks

Mircea Craciun June 11, 2024

@Hannes Obweger - JXL for Jiradid you see my question above? Thanks

Hannes Obweger - JXL for Jira
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
June 12, 2024

Hi @Mircea Craciun

apologies - yes, you can use issue grouping to group your issues by Assignee or Parent (or any other field, for that matter), and enable the sum-up feature to see sum-ups for these groups.

For more advanced use cases, you can also add any number of grouping and/or sum-up levels to a custom issue structure. There, you can also combine grouping and sum-ups with issue hierarchies.

If you haven't yet, I'd recommend to check out our quick demo video here. It gives a great overview of all the things that JXL can do for you.

Best,

Hannes

 

Mircea Craciun June 12, 2024

Thanks, custom structure grouping with sumups seems to have solved it.

0 votes
Heenaben Sardarbhai Chaudhary June 4, 2024

Hi @Mircea Craciun 

 

you can use jql like this : 

parent in (APD-75) AND duedate = '2024-07-01'
0 votes
John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 4, 2024

Hi Mircea - This looks like a ScriptRunner function. Do you ScriptRunner? 

 

Mircea Craciun June 5, 2024

Never used it. I just installed it but I still get the same error. I did a JQL Keyword sync and the same. What else do I need to do to get this working?
Thanks

John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 5, 2024

Sorry, not a ScriptRunner user, but it should be available after you do the install. Maybe log out and back in again? 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events