Dear,
spent already quite some time scrolling through post but couldn't find perfect match.
I want to build JQL which gives me all the tasks under US which are part of the current sprint
'problem' is that tasks re not directly part of a sprint but only userstories are so I'm bit struggling to get that relationship in my query
project = XXX and issuetype = task and issue in linkedissuesof (Sprint = 65483 )
gives an exception.
any suggestions? (or link to a proper youtube training on writing JQL?)
kind regards,
Hey @Gerrit Deloose
The default linkedIssues() function does not support subqueries and can only be used with dedicated (single) issue keys.
What you're trying to achieve could be done using an additional app.
Jira Workflow Toolbox, for example, comes with dedicated JQL functions, and a query for your use case might read
project = XXX and issuetype = task and issue in linkedTo("sprint = 123")
using the linkTo() function.
Another app capable of doing this is ScriptRunner, which has a linkedIssuesOf function.
Regards from Germany,
Thorsten
Disclaimer: I'm part of the team behind the first app mentioned.
Hello @Gerrit Deloose
Welcome to the Atlassian community.
I have a few questions about your statement:
I want to build JQL which gives me all the tasks under US which are part of the current sprint
Can you show us a "US" show the "tasks" that are "under" it? I want to make sure I correctly understand the issue type hierarchy you are using.
To find issues that are in a sprint use the syntax:
sprint = <sprint ID>
Refer to the Sprint field documented here in Advanced JQL Searching:
If you use a query like this:
project = XXX and issuetype = task and sprint = 123
...then you will get all Task type issues from project XXX that are in the sprint with ID = 123.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Trudy,
I've linked tasks to US using 'is action plan of' linktype.
when I run your query I only get 1 out of the 44 tasks. seems like the field sprint is only available/created/copied down (?) for this on task. On the other tasks the field 'sprint' is empty (so it makes sense they are not appearing in the resultset.
Should I create an automation to fill in the field 'sprint' on task level upon starting the sprint?
Gerrit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Gerrit Deloose
You have indicated that you are using generic linking to create the relationship between the US and the tasks. The native Jira functionality does not infer any sort of parent/child relationship between items linked in this manner nor does it automatically copy of synch data between items linked in this manner.
Let us re-examine your requirement:
I want to build JQL which gives me all the tasks under US which are part of the current sprint
Which issues are you assigning to the sprint; the US or the tasks?
If the US is assigned to the sprint but the tasks are not, then you are correct that the query I provided will not retrieve the tasks.
Are the US and the tasks in the same project?
Is it your intention that all the tasks linked to a US be in the same sprint as the US?
Are tasks ever linked to more than one US?
Is there a specific reason you chose to use US and tasks and linking rather than using subtasks, or Epics and child items?
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.