Hello,
I’m having trouble with a JQL query. I’m trying to setup a Confluence page to return issues that were completed in the last month (which I’m willing to define as 30 days since it doesn’t seem like JQL has a months capability). To that end, my JQL statement is:
project="XX" AND status CHANGED TO "Done" AFTER -30d
but this consistently returns zero results, even though I have an issue that qualifies. If I remove the TO criterion like this:
project="XX" AND status CHANGED AFTER -30d
it seems to work. If I try:
project="XX" AND status CHANGED TO "Done"
it also fails to return any results. Oddly enough, that last queries fails to return any results for any status other than "To Do", and even that one only returns my Epics for some odd reason. What am I doing wrong?
Note that this is a next-gen Jira project, if that matters.
Welcome to the Community!
Jira does use months, but only in terms of this month, or last month, etc.
Can you try the below and see if it is what you need?
project = XX AND resolution date >= startofMonth ("-1") AND resolution date <= endofMonth ("-1")
This should show all tickets resolved in October.
Thanks @Liam Green ! I was able to get it to work by slightly modifying it (since I wanted the changes to be for November instead of October, although when I generate the report will obviously impact that...) to
project = "XX" AND resolutiondate >= startofMonth () AND resolutiondate <= endofMonth ()
But of course the downside here is it only works for resolved issues and doesn't explain the larger issue of why I can't do this with statuses alone (even if Done + resolved were some unique status, which I don't think it is, it should be able to work for ones that changed to "In Progress" for example).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
I've just done a little work on it on my instance, can you try:
project = XX AND status changed TO Done AFTER startOfMonth() BEFORE endOfMonth()
That just worked for me (although I don't have a 'done' state, I have 'resolved')
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.
No, it doesn't work - I wasn't trying in Next Gen before.
It seems as though it is a known bug in Jira. There is a page for it:
https://jira.atlassian.com/browse/JRACLOUD-72180
The page does have a workaround on it too. There is also a workaround trick on this question: https://community.atlassian.com/t5/Jira-Software-questions/BUG-JQL-Unable-to-query-next-gen-project-s-issues-with-status/qaq-p/1319216 which has been said to work.
Hopefully Jira will resolve it at some point soon
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for the link to the bug issue and workarounds! I definitely missed those. Very sad to see that it is an ongoing problem that seems to remain unresolved (and at least one person reports the workaround as not being reliable either). Using the numeric ID of the status is the trick it seems.
Also, looking at the numeric status workaround (the second link you give above) makes it seem pretty clear what's happening on the backend: Jira treats Done for classic projects as a status with a different ID than Done in next-gen projects. What a strange choice (and seemingly something that would be relatively easy to fix simply by changing Done to Complete by default or some such)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
No problem!
I agree, it does seem like a very simple fix for them, and judging by the comments it's a very annoying bug.
If you're happy with my answer and it helped then feel free to 'accept' it
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
Indeed, this is weird because this should work (I does work in my instance).
Are you sure that "Done" is the right status name ? Which statuses does Jira propose when you're building your search ? If it is the right status name, I suggest you to raise an issue from the Atlassian support portal (Suggestion and bug reports) :
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for testing that! I did indeed use the Advanced Search functionality in Jira so that it would auto-suggest status strings and Done was in there (and I selected it, just in case I was having a whitespace issue). Still no dice. I'll submit it as a bug then.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Guilhem Dupuy Disturbingly, I can only submit a proper bug report if I pay for Jira. As I'm currently testing it out for a small team with a free account, I can't file the bug. Super odd approach, Jira.
I did manage to find my way on to the engineers' Jira board for Jira (super meta!) and seem able to submit a bug that way, but I don't know if they'll see it...
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.