Hi,
I'm looking for a queries that can return the user stories on my backlog that are DONE with some criteria, and on whom time have been spend (either on the user story itself, or one of it subtask)
I have a query that works fine, as long as I don't have to look for timespent on subtasks :
project in ("<MyProject>")
AND status in (Closed, Done, Built)
AND "Story Points" > 0
AND labels = label1
AND labels = label2
AND timespent > 0
But devs in my team also log time on subtasks, and sometimes not the user story itself.
I tried this :
project in ("<MyProject>")
AND status in (Closed, Done, Built)
AND "Story Points" > 0
AND labels = label1
AND labels = label2
AND ( timespent > 0 OR issueFunction in subtasksOf("timespent > 0"))
No JQL errors, but didn't work. I can't find any issue. Do you have an idea ?
Thank you very much
@Trudy Claspill I would like to seek assistance on a related query on how I can see my logged hours in a project for this week only, is this possible? or for the current week
Hello @Sherwin Soriano
Please click the Ask button in the blue menu bar above to start your own new Question post.
1. Creating a new Question will get it better visibility in the community than adding to a post that is a year and a half old.
2. Adding to such and old post, especially asking a tangential question, is referred to as "necroposting" and is considered poor community etiquette.
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.
I think this will work
project in ("<MyProject>")
AND status in (Closed, Done, Built)
AND "Story Points" > 0
AND labels = label1
AND labels = label2
AND issuetype not in sutaskIssueTypes()
AND (
timespent > 0 OR (
issueFunction in subtasksOf("project in ("<MyProject>")
AND status in (Closed, Done, Built)
AND "Story Points" > 0
AND labels = label1
AND labels = label2"
AND timespent > 0))
)
)
Breaking it down, the first part will get all the non-subtasks that have story points and non-zero timespent:
project in ("<MyProject>")
AND status in (Closed, Done, Built)
AND "Story Points" > 0
AND labels = label1
AND labels = label2
AND issuetype not in subtaskIssueTypes()
AND (
timespent > 0
The second part takes the non-subtask issues retrieved in the first part and selects just the ones that have non-zero timespent
AND (
timespent > 0
So, at that point you have all the non-subtask issues with non-zero time spent.
The third part uses the first part (all non-subtask issues, whether they have timespent or not) and gets the subtasks of those issues, but just the subtasks that have non-zero timespent.
OR (
issueFunction in subtasksOf("project in ("<MyProject>")
AND status in (Closed, Done, Built)
AND "Story Points" > 0
AND labels = label1
AND labels = label2"
AND timespent > 0))
)
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.