I have this query:
project = SD AND issuetype in standardIssueTypes()
AND status in (Closed, "SD: Resolved") AND assignee
in (currentUser()) order by created DESC
How can I add some JQL so that it will tell me how many tickets are done in a week?
Thanks again
Is this for a specific week (like February 1-8), or for a week relative to when the query is being run (like 2 weeks ago)?
Relative week. I essentially want to be able to run this any week to get info on my previous week in a calendar year.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Add this to your query:
resolutiondate >= startOfWeek(-1) and resolutiondate <= endOfWeek(-1)
This will pull tickets that were resolved last week (if you want to see tickets created last week, just replace resolutiondate with createdDate). Note that jira defines a week as Sunday-Sunday, so if you run it today, it will pull anything resolved between 12:01 AM on Sunday the 3rd and 11:59 PM on Sunday the 9th. If you want it to be relative to the day of the week the query is run on, replace startofweek(-1) with startofday(-12) and endofweek(-1) with endofday(-6).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you so much for this info!
I'm still fairly new to the JQL scene, so, where would I add that to my query?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It doesn't really matter, as long as it's before ORDER BY (there's probably a best practice in terms of performance, but I honestly don't know enough about jql to tell you what it would be, but it shouldn't matter unless you are pulling 10s or 100s of thousands of issues). I generally tend to put the dates at the end of the query and in parenthesis for readability, but that's personal preference.
Example:
project = SD AND issuetype in standardIssueTypes()
AND status in (Closed, "SD: Resolved") AND assignee
in (currentUser()) AND (resolutiondate >= startOfWeek(-1) AND resolutiondate <= endOfWeek(-1)) order by created DESC
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.