Hi
I have used below scripts to get all issues (only Sub-task) under specific sprint
select it.pname, cfv.issue, cfv.stringvalue as SprintNumber, ao."NAME" as SprintName, cf.cfname, issue.IssueNum as IssueKey, ist.pname
from CustomFieldValue cfv
inner join CustomField CF on CF.Id = CFV.CustomField
inner join jiraissue issue on issue.id = cfv.issue
inner join Project P on issue.Project = P.Id
inner join "AO_60DB71_SPRINT" ao on ao."ID" = Cast(cfv.stringvalue AS bigint)
inner join issuetype it on it.id = issue.issuetype
inner join issuestatus ist on ist.id = issue.issuestatus
where cf.cfname='Sprint'
and ao."NAME" = 'mysprint'
and it.pname = 'Sub-task'
But above query returns only 8 records which is not correct.
It gave 61 records in JIRA application
JQL => project = ABCD AND Sprint = 39614 and issuetype = Sub-task
it would be great and very thank full if some one help me to resolve the issue
Regards
Santosh
It would be better not to use SQL, as you can see, the database is not designed for reporting or direct access.
One of things you've run into is that sub-tasks do not belong to sprints. They go into them as their parents are selected for a sprint and it's their parents that belong to it. I'd suggest going with Olga's suggestion, as that uses the logic in the application to find them.
Hello @Santosh V
Do you have scriptrunner? Because of this function.
Sprint has a key right? Just swap TEST-123 with your sprint key.
issueFunction in subtasksOf("\"Epic Link\"=TEST-123")
BR, Olga
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.