You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
Hi All,
I think my query may be botched. Please see below.
issueFunction in subtasksof("project=AAAA and issuetype in (\"TASK\") AND created (\"20/mar/23\")AND status not in (Cancelled, \"On Hold\")
I am looking for a query to pull a subset of all the subtask assigned to my team example (March 2023 & April 2023),
Hello @ADENUGES2282
Welcome to the Atlassian community!
How is the query not giving you the results that you want? What is it including that you think it should not? What is it excluding that you think it should include?
"issueFunction in subtasksOf()" will give you the subtasks of the issues that match the criteria in the parentheses. What you have in the parentheses is
project=AAA and issueType=Task and created(20/mar/23) and status not in (Cancelled, "On Hold")
That query would give you all the Task in project AAAA which are in statuses other than Cancelled or On Hold, and where the Task creation date has some relationship to "20/mar/23".
However the syntax concerning the Creation Date is not valid syntax:
created(20/mar/23)
What are you trying to accomplish with that criteria? Are you looking for Tasks that were created on that date, or after that date, or something else?
After getting that syntax corrected you will have a list of tasks returned by that part of the query.
Then the "issue in subtasksOf()" will give you all the subtasks under the Tasks.
When I try by date created (\"20/mar/23\")") it returns nothing though I know 3 tasks with 69 subtasks were created on that day
That is because that is not valid syntax.
Also note that the Created value is a date and time. You need to consider that in your JQL.
If you want issues created on a specific date then you need:
created > "20/mar/23" and created < "21/mar/23"
If you want issues created in a date range you need to specify that date range:
created > "20/mar/23" and created < "20/apr/23"
Fixing that will give you all the Tasks created in that date range in that project that are currently not Cancelled or On Hold.
When you use that subfilter with subtasksOf you will then get all the subtasks associated with those tasks.
If you want to only see subtasks that are currently in progress then you need to add that criteria to your filter also:
issue in subtasksOf(<your subfilter>) and status not in (Cancelled, "On Hold")
The criteria inside the subtasksOf parentheses are applied to the parent issues being selected. The criteria you add outside of the parentheses will apply to the subtasks retrieved for those parent issues.
IMPORTANT NOTE: these filters are looking at the current status of the issues. They are not looking at the status the issues were in during your specified date range.
If you want to get the issues in the specified statuses during your specified date range that would require using the WAS IN (or WAS NOT IN) operator with the DURING predicate.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Welcome to the community.
You can use subtasksof function if you want to provide parent criteria. I couldn't catch the requirement clearly. Do you want to see subtasks or parents? Also, how do you define your team? A set of assignees or a cf?
Also take a look at Script Runner functions page.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks both community leaders for replying.
When I try by date created (\"20/mar/23\")") it returns nothing though I know 3 tasks with 69 subtasks were created on that day
Yes I would like to see all tasks and subtasks created and in progress for a given period e.g from 03/20/23 till date or at least on a monthly or quarterly basis.
My Team - referring to my project team.
Hope this helps clarify.
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.