Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to order a query by last active sprint

Heiner
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 29, 2023

I have a filter/query showing a list of all issues in status done ordered by sprint.

But some issues are assigned to more than one sprint and then the first assigned sprint is used for sorting. But I want to order by the last assigned sprint.

My query:

status = 'DONE' AND Sprint is not EMPTY order by Sprint DESC

Ordering by "Updated" does not work as sometimes old issues are updated.

Result: Issues completed in Sprint 70 are mixed with issues completed in Sprint 69.

image.png

 

 

2 answers

1 accepted

0 votes
Answer accepted
Piotr Bojko
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 Champions.
May 22, 2018

with this plugin https://marketplace.atlassian.com/apps/1218767/smart-ql?hosting=server&tab=overview

 

you can do following query

select aux.ASISSUEKEY(IL.SOURCE), count(il.DESTINATION) 
from ISSUELINKS IL where name = 'Relates' or name = 'jira_subtask_link'
group by IL.SOURCE HAVING COUNT(IL.DESTINATION) > 2
0 votes
Tuncay Senturk _Snapbytes_
Community Champion
May 21, 2018

1. Script Runner has "issueFunction in hasSubtasks()" JQL function but I do not know a way to restrict issues which have 2 or more subtasks

2. Enhancer Plugin has "Linked Issues" custom field. You can use it in JQL function e.g. ("Relates Link Field" > 2)

https://confluence.snapbytes.com/display/JEP/Linked+Issues+custom+field

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events