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
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.
Join now to unlock these features and more
Wanted to validate script to see if I am on the right track and looking for feedback to see whether this can be refined further.
- I want to filter out Issues that have been in "To Do" up till today OR
- Capture issues that has changed from "To Do" to "In Progress" up to today OR
- Capture issues that has changed from "To Do" to "Done" up to today
Below is JQL written:
Project = "Project Name" AND statusCategory IN ("To Do") AND NOT Status Changed AFTER "2023-09-27" OR (project = "Project Name" AND Status Changed FROM "To Do" to "In Progress" DURING ("2023-09-01", "2023-09-27")) OR (project = "Project Name" AND Status Changed FROM "To Do" to "Done" DURING ("2023-09-01", "2023-09-27"))
Welcome to the Atlassian community.
Your second and third bullet items are correctly defined in the second and third OR clauses in your JQL statement.
I'm not sure that I understand the goal of your first bullet item. Can you explain that one in more detail? The JQL that you have written for that will get the issues that
- currently are in a status that is in the "To Do" status category and have been in that status unchanged since 2023-09-27
That does not necessarily exclude issues that have been in a status of "To Do" for some time prior to today, which is what I think your first bullet states.
Do you want to include those issues or exclude them from your results set?
If you want the issues that have been in the "To Do" status and have never changed to another status as of the start of today, then the JQL you need is
Project = "Project Name" AND status IN ("To Do") and NOT status CHANGED BEFORE startOfDay()
If you want to dynamically derive the dates each time you execute the filter, look at the incorporating the startOf and endOf functions instead of hard-coded dates.
You can find more information on those functions here: