Let's break into this wonderful day with a dose of usefulness. Yes, you've heard much about JQL and often wonder how to write a query to find what you need. We have collected a few useful JQLs for the Jira Data Center in one selection. It may be helpful to you. Let's go!
1. Issues I Am Watching.
To list all the issues that the current user has marked as 'watching,' allowing them to easily track and stay updated on the progress of these specific issues.
issue in watchedIssues()
2. Issues in My Recent History.
To display all issues the current user has recently viewed or interacted with. This query helps users quickly revisit issues they have been working on or reviewing, making it easier to resume their work.
issue in issueHistory()
3. Open Sprint Issues in Several Projects.
To display all issues that are part of open sprints within "Project A" and "Project B". This query helps teams focus on the tasks currently in progress that need immediate attention within the specified projects.
project in ("Project A","Project B") AND Sprint in openSprint()
4. Issues Related to Epic.
To display all issues that are either the epic EPC-123 itself or have EPC-123 as their "Epic Link." This query helps track the progress of a specific epic and all the related tasks and associated sub-tasks.
issuekey in (EPC-123) or "Epic Link" in (EPC-123)
5. Development Project Issues Due Within the Next Week.
To display all issues in the "Development" project due within the next week. This query helps the team prioritize and focus on upcoming deadlines, ensuring tasks are completed on time.
project = Development and dueDate > now() and dueDate < 1w
6. Issues Created This Week in Project ABC.
To display all issues created during the current week within the "ABC" project. This query helps track recent activity and understand the workload added to the project over the past week.
created >= startOfWeek() AND created <= endOfWeek() AND project in (ABC)
7. Done Issues Without a Resolution.
To display all issues that are marked as "Done" but do not have a resolution set. This query helps identify issues that may have been closed without adequately documenting the resolution, ensuring that all completed tasks are accurately recorded.
Statuscategory = Done and resolution is empty
8. Issues Resolved Last Week.
To display all issues that were resolved during the previous week. This query helps review the work completed in the past week, allowing for better tracking of progress and productivity.
resolved >= startOfWeek(-3d) AND resolved <= endOfWeek(-4d)
9. AB Project Issues Moved to Done from In Progress in the Last Week.
To display all issues in the "AB" project that were moved from "In Progress" to "Done" within the last week. This query helps track recently completed tasks and understand the project's progress over the past week.
project = "AB" and status CHANGED from "In Progress" to "Done" AFTER startOfWeek(-1w)
10. Development Project Issues Moved to "In Progress" This Week.
To display all issues in the "Development" project that have been moved to the "In Progress" status since the start of the current week. This query helps track the work that has begun this week and understand the current workload.
project = Development and status CHANGED TO "In Progress" AFTER startOfWeek()
11. Issues Moved from "To Do" to "Done" During the Current Month.
To display all issues moved from the "To Do" status to the "Done" status within the current month. This query helps in tracking the completion of tasks over the course of the month, providing insights into productivity and progress.
status CHANGED DURING (startOfMonth(), endOfMonth()) FROM ("To Do") TO ("Done")
12. Issues That Were "In Progress" Between January 1, 2024, and February 3, 2024.
To display all issues in the "In Progress" status between January 1, 2024, and February 3, 2024. This query helps review the work being actively addressed during the specified time period.
status was in ("In Progress") DURING ("2024/01/01", "2024/02/03")
And if you can get a specific sample of tasks using JQL, unfortunately, no queries would help you calculate various time metrics. As a workaround in this case, we suggest using an app from my team - Time Between Statuses.
Easy configuration of time metrics calculation based on issue transition between different statuses will help you calculate the necessary KPIs and make decisions based on these calculations.
We hope you find our tips useful. Have productive working days! 🙂
Iryna Komarnitska_SaaSJet_
Product Marketer
SaaSJet
Ukraine
8 accepted answers
1 comment