Uploaded image for project: 'Jira Platform Cloud'
  1. Jira Platform Cloud
  2. JRACLOUD-78540

JQL query search using "status was" returns incorrect unreliable results for Team Managed projects

      Status Update 2/09/2022

      Hi everyone,

      Thank you for your votes, comments, and patience on this issue. Our team has recently investigated this bug. Firstly, we were able to find out why the “status was” queries for company-managed projects are broken in certain scenarios. We are glad to announce that this part has now been fixed: https://jira.atlassian.com/browse/JRACLOUD-79741

      We hope that it will improve your experience with JQL and will ease the transition for everyone migrating to Cloud from Server and Data Center.

      We understand that many of you require this feature to work with the team-managed (next-gen) projects. We plan to solve the underlying problem but in order to ensure good performance of the search we need to first deliver some necessary architectural improvements. For now you can try using the workaround and replacing status name with status ID for each project as explained in this article.

      We will post an update there when new information is available.

      Best,
      Mila Szydlowska

      Summary

      For team managed projects, when searching for issues using JQL such as:

      project = PROJECT_NAME AND (status CHANGED FROM "To Do" OR status = "To Do")
      
      status was "In Progress" after "2022-03-09" AND status in ("Ready for Release", Done, Closed, Declined, Postponed)
      
      status was "In Progress" after endOfDay(-21d) AND status in ("Ready for Release", Done, Closed, Declined, Postponed)
      
      assignee WAS currentUser() AFTER "2022-01-01" AND project = "DEMO"
      

      If JQL contains "WAS" and AFTER or endOfDay it ** does not consider the timeline and returns all results.

      The results are unreliable.

      Steps to Reproduce

      • Work case 1
      1. Create a  project with statuses "To Do", "In Progress" and "Done".
      2. Create some issues, and transition some of them around.
      3. Run the query: project = PROJECT_NAME AND (status CHANGED FROM "To Do" OR status = "To Do")
      4.  Run the query  status was "In Progress" after endOfDay(-2d) 
      • Work case 2
      1. Have or create several issues in and outside of the required parameters 
      2. Run the query status was "In Progress" after endOfDay(-21d) AND status in ("Ready for Release", Done, Closed, Declined, Postponed)

      Expected Results

      • Only issues in the specified parameters should be returned.

      Actual Results

      • Issues not in the specified parameters are returned

      Notes

      We primarily see this happening in these scenarios:

      • The search doesn't work with team-managed projects

      In both scenarios, using the status_id instead of the status_name works. This also affects searches performed via the Jira APIs.

      Workaround

      Use the Status Id instead of Status name when using was or changed in JQL as explained in this article: https://confluence.atlassian.com/jirakb/in-a-team-managed-project-jql-is-not-working-if-it-contains-status-was-statusname-1163769987.html

          Form Name

            [JRACLOUD-78540] JQL query search using "status was" returns incorrect unreliable results for Team Managed projects

            Raul Cesar de Leon added a comment - COnfirming my issue reported last https://jira.atlassian.com/browse/JRACLOUD-78540?focusedId=2962236&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-2962236   now works  

            mini added a comment -

            Thanks sooooo much Mila

            mini added a comment - Thanks sooooo much Mila

            Mila added a comment -

            Hi everyone,

            This is Mila from the Jira Platform team. I'm happy to inform you that we have fixed this bug. 

            In case you still experience any problems with historical searches for Team Managed projects please contact our support so we can assist you. 

            Sincerely,

            Mila

            Mila added a comment - Hi everyone, This is Mila from the Jira Platform team. I'm happy to inform you that we have fixed this bug.  In case you still experience any problems with historical searches for Team Managed projects please contact our support so we can assist you.  Sincerely, Mila

            This issue hasn't been fixed OR it is reproducible again! The project type is team-managed. The result always shows 0 (No results) but in reality, there are actual data. 

            Rustam Nychyporenko added a comment - This issue hasn't been fixed OR it is reproducible again! The project type is team-managed. The result always shows 0 (No results) but in reality, there are actual data. 

            Hi there, by using - status changed TO "Bug Fixing" - it returns any ticket that has been moved to that status. 

            Im looking for a solution which can actually show me the ones who have just been moved lastly in the given status.
            How is that possible?

            Paolo Mazzacani added a comment - Hi there, by using - status changed TO "Bug Fixing" - it returns any ticket that has been moved to that status.  Im looking for a solution which can actually show me the ones who have just been moved lastly in the given status. How is that possible?

            augusto added a comment - - edited

            This is going since 2019, I still don`t know how Atlassian handle this... but for sure we can see the bug fixing is pretty bad. I don`t know if the team is small for a big amount of bugs but for sure something is not right.

            augusto added a comment - - edited This is going since 2019, I still don`t know how Atlassian handle this... but for sure we can see the bug fixing is pretty bad. I don`t know if the team is small for a big amount of bugs but for sure something is not right.

            I am also seeing this issue for both Team Managed and Company/Classic projects. Querying with status IDs also returns invalid results.

            Nathan Stout added a comment - I am also seeing this issue for both Team Managed and Company/Classic projects. Querying with status IDs also returns invalid results.

            Jeff Davis added a comment - - edited

            The title of this issue should remove "for Team Managed Projects".  We are experiencing the issue in a Jira Cloud instance with no team managed projects.

            The comment from 02/Sep is incorrect.  The issue has not been resolved for company managed projects.  

            Jeff Davis added a comment - - edited The title of this issue should remove "for Team Managed Projects".  We are experiencing the issue in a Jira Cloud instance with no team managed projects. The comment from 02/Sep is incorrect.  The issue has not been resolved for company managed projects.  

            Hi, Jira team!

            I was able to user the search as instructed in the workaround section, but I still get inconsistent results. I searched for a specific change of status in a range of dates and got 7 results. When I narrowed the results by 2 different users, the same task showed in both results, even though it had been changed by only one of them.

             

            My queries were:

            project = <project_name> and status changed FROM 10497 to 10073 DURING (2022-09-12,2022-09-16)

            project = <project_name> and status changed FROM 10497 to 10073 DURING (2022-09-12,2022-09-16) and status changed by 62c2ffbee16ddfe82bdf025e 

            Jenifer Roveran added a comment - Hi, Jira team! I was able to user the search as instructed in the workaround section, but I still get inconsistent results. I searched for a specific change of status in a range of dates and got 7 results. When I narrowed the results by 2 different users, the same task showed in both results, even though it had been changed by only one of them.   My queries were: project = <project_name> and status changed FROM 10497 to 10073 DURING (2022-09-12,2022-09-16) project = <project_name> and status changed FROM 10497 to 10073 DURING (2022-09-12,2022-09-16) and status changed by 62c2ffbee16ddfe82bdf025e 

            Mila added a comment -

            Hi everyone,

            Thank you for your votes, comments, and patience on this issue. Our team has recently investigated this bug. Firstly, we were able to find out why the “status was” queries for company-managed projects are broken in certain scenarios. We are glad to announce that this part has now been fixed: https://jira.atlassian.com/browse/JRACLOUD-79741

            We hope that it will improve your experience with JQL and will ease the transition for everyone migrating to Cloud from Server and Data-Center.

            We understand that many of you require this feature to work with the team-managed (next-gen) projects. We plan to solve the underlying problem but in order to ensure good performance of the search we need to first deliver some necessary architectural improvements. For now you can try using the workaround and replacing status name with status ID for each project as explained in this article.

            We will post an update there when new information is available.

            Best,
            Mila Szydlowska

            Mila added a comment - Hi everyone, Thank you for your votes, comments, and patience on this issue. Our team has recently investigated this bug. Firstly, we were able to find out why the “status was” queries for company-managed projects are broken in certain scenarios. We are glad to announce that this part has now been fixed: https://jira.atlassian.com/browse/JRACLOUD-79741 We hope that it will improve your experience with JQL and will ease the transition for everyone migrating to Cloud from Server and Data-Center. We understand that many of you require this feature to work with the team-managed (next-gen) projects. We plan to solve the underlying problem but in order to ensure good performance of the search we need to first deliver some necessary architectural improvements. For now you can try using the workaround and replacing status name with status ID for each project as explained in this article . We will post an update there when new information is available. Best, Mila Szydlowska

            kscarmardo added a comment -

            We're now relying on the functionality as is, so reverting it would cause impact.  For us it's better than nothing at this point, but I relate to the sentiment and also lost some time debugging.  An additional warning or message when using DURING would improve experience for others that go down this path in the short-term.

            kscarmardo added a comment - We're now relying on the functionality as is, so reverting it would cause impact.  For us it's better than nothing at this point, but I relate to the sentiment and also lost some time debugging.  An additional warning or message when using DURING would improve experience for others that go down this path in the short-term.

            Would be in favor of reverting this functionality if it's not correctly working. Only found out after few hours of debugging JQL queries / searching issues history the results are not reliable... 

            mark.debont added a comment - Would be in favor of reverting this functionality if it's not correctly working. Only found out after few hours of debugging JQL queries / searching issues history the results are not reliable... 

            in 2 days we can celebrate 3rd anniversary of this ticket  

            tymoteusz_motylewski added a comment - in 2 days we can celebrate 3rd anniversary of this ticket  

            hi guys i was trying to track status changed to closed this week, can somebody please help me out? what am i missing? project= "x" AND issuetype = Incident AND status CLOSED >= -7d

            Edyta Sokolowska added a comment - hi guys i was trying to track status changed to closed this week, can somebody please help me out? what am i missing? project= "x" AND issuetype = Incident AND status CLOSED >= -7d

            Hello everyone,

            Thanks for your feedback. The workaround is definitely not a solution but the idea is to get everyone unblocked while we work on a solution. 

            I updated the workaround description as in company-managed projects there is an easier way of getting status ids. 

            Please, let us know if the workaround doesn't work for you.

            Have a great day!  

            Daniel Talebi added a comment - Hello everyone, Thanks for your feedback. The workaround is definitely not a solution but the idea is to get everyone unblocked while we work on a solution.  I updated the workaround description as in company-managed projects there is an easier way of getting status ids.  Please, let us know if the workaround doesn't work for you. Have a great day!  

            Hey Daniel!

            While the work around technically works, its not a good solution if you're using custom status's because the status id generated for each project is different. That means that if you have to manually add the status id of every status in every project individually. And, it's not like you can even just slog your way through this all once and be done, because every time you create a new project you have to go through and find all the new status id for that new project and update all your query's with them.

            Mitchell Westmoreland added a comment - Hey Daniel! While the work around technically works, its not a good solution if you're using custom status's because the status id generated for each project is different. That means that if you have to manually add the status id of every status in every project individually. And, it's not like you can even just slog your way through this all once and be done, because every time you create a new project you have to go through and find all the new status id for that new project and update all your query's with them.

            @Daniel

            Thanks for the response. 

            Unfortunately, we are using company managed projects; so I'm afraid the workarounds won't apply for us  

            Looking forward to the official fix

            Raul Cesar de Leon added a comment - @Daniel Thanks for the response.  Unfortunately, we are using company managed projects; so I'm afraid the workarounds won't apply for us   Looking forward to the official fix

            sguerrieri added a comment -

            Hi Daniel, 

            Thank you for your reply! I hadn't noticed the workaround, but I just tried and it worked for me! I still think that it would be important to have a fix so that we can search also using the Status name/label, but for the interim this works. 

            Thanks again!

            sguerrieri added a comment - Hi Daniel,  Thank you for your reply! I hadn't noticed the workaround, but I just tried and it worked for me! I still think that it would be important to have a fix so that we can search also using the Status name/label, but for the interim this works.  Thanks again!

            Hello everyone,

            Thanks for your patience. While we continue to work on a solution, please let us know if the workaround using status id worked. If it didn’t work, please comment here and raise a support ticket with details so that we can follow it up.

            Thanks

            Daniel Talebi added a comment - Hello everyone, Thanks for your patience. While we continue to work on a solution, please let us know if the workaround using status id worked. If it didn’t work, please comment here and raise a support ticket with details so that we can follow it up. Thanks

            sguerrieri added a comment -

            Still an issue, please fix this! How can we run reports to see the number of tickets that went through a certain status without this function working as expected? This is key!

            sguerrieri added a comment - Still an issue, please fix this! How can we run reports to see the number of tickets that went through a certain status without this function working as expected? This is key!

            problem definitely still there

             

            with this JQL

             

            project in ([project names]) and status changed to [any status except DONE] during ("2022/01/22", "2022/01/29") will give me results

             

            project in ([project names]) and status changed to "Done" during ("2022/01/22", "2022/01/29") will NOT give me results (altho manual verification shows me 8)

            Raul Cesar de Leon added a comment - problem definitely still there   with this JQL   project in ( [project names] ) and status changed to [any status except DONE] during ("2022/01/22", "2022/01/29") will give me results   project in ( [project names] ) and status changed to "Done" during ("2022/01/22", "2022/01/29") will NOT give me results (altho manual verification shows me 8)

            mini added a comment -

            the problem is still not fixed,

            querying by ID is a nightmare
            but finally DO NOT return correct match.
            just tried on the same mini project 15 stories as before

            status was 11143 on .... return 1 ticket => correct answer is 5
            status was 10500 on ....  return 0 tickets => correct answer is 2
            status in (10500,11143) return 0 tickets => correct answer is 8

             

            mini added a comment - the problem is still not fixed, querying by ID is a nightmare but finally DO NOT return correct match. just tried on the same mini project 15 stories as before status was 11143 on .... return 1 ticket => correct answer is 5 status was 10500 on ....  return 0 tickets => correct answer is 2 status in (10500,11143) return 0 tickets => correct answer is 8  

            I can't believe it's still not fixed.

            Alexandre VANKEIRSBILCK -CROIX- added a comment - I can't believe it's still not fixed.

            AlanC@aceik added a comment - - edited

            The only workaround that's currently mentioned in the ticket description:

            Currently, this bug is affecting the default statuses from the Next-Gen project. So, if you use custom statuses, the search is expected to work.
            Renaming the columns to something different than the default value returns the issues from the search.

            may not be acceptable for some organizations.

            Over in the thread:

            https://community.atlassian.com/t5/Jira-Software-questions/BUG-JQL-Unable-to-query-next-gen-project-s-issues-with-status/qaq-p/1319216#M67818

            Stephen Wright suggests an alternative workaround:

            Search by using the IDs instead of the NAMES of the statuses.

            Stephen also provides steps for finding the IDs of your statuses via the Jira v.3 API.

            This second workaround has worked well for me.

            AlanC@aceik added a comment - - edited The only workaround that's currently mentioned in the ticket description: Currently, this bug is affecting the default statuses from the Next-Gen project. So, if you use custom statuses, the search is expected to work. Renaming the columns to something different than the default value returns the issues from the search. may not be acceptable for some organizations. Over in the thread: https://community.atlassian.com/t5/Jira-Software-questions/BUG-JQL-Unable-to-query-next-gen-project-s-issues-with-status/qaq-p/1319216#M67818 Stephen Wright suggests an alternative workaround: Search by using the IDs instead of the NAMES of the statuses. Stephen also provides steps for finding the IDs of your statuses via the Jira v.3 API. This second workaround has worked well for me.

            Is this issue the reason why this query returns from an old style project results in JIRA:

            status changed to done after -7d ORDER BY updated

            and this query returns nothing even when we have moved cards to done within the last week?

            project="<a next-gen project>" AND status changed to done after -7d ORDER BY updated

            Ethan Locke added a comment - Is this issue the reason why this query returns from an old style project results in JIRA: status changed to done after -7d ORDER BY updated and this query returns nothing even when we have moved cards to done within the last week? project="<a next-gen project>" AND status changed to done after -7d ORDER BY updated

            This bug might also affect classic software project that share the same status.

            My project is a classic software project that used the bug tracking template, which also shares the default status as "To Do". 

            The JQL query "status was 'To Do'" gives the wrong results.
            After changing the scheme and moving Issues to "Open"
            The JQL query "status was 'Open'" gives the correct results.

            Wolfgang Landes added a comment - This bug might also affect classic software project that share the same status. My project is a classic software project that used the bug tracking template, which also shares the default status as "To Do".  The JQL query "status was 'To Do'" gives the wrong results. After changing the scheme and moving Issues to "Open" The JQL query "status was 'Open'" gives the correct results.

            We need this to be able to accurately identify cost of service we provide. 

            Indeed Resume Review added a comment - We need this to be able to accurately identify cost of service we provide. 

            Ert Dredge added a comment - - edited

            I have the same issue as @probinson1 :

            project = <PROJECT> AND status = Done

            ...gets me over 600 results, while

            project = <PROJECT> AND status CHANGED TO Done
            

            ...gets only a single result.

             

            The workaround "Renaming the columns to something different than the default value return the issues from the search" maybe works in some cases?   If I try this query for some of the more unusually named statuses in my workflow it did get at least plausible results, and I checked one with the REST API and a shell script and confirmed that it's returning correct results.

            If I try the status "Blocked", though, I do not get correct results, and I didn't think that was one of the default statuses that was created with the project.  So I'm not feeling super confident in the workaround.

            Playing with using FROM and TO in the query doesn't seem to get at the correct numbers, either.

             

            We have a key result for our team's quarterly goal which involves understanding who actually initially started work on an issue.  I'm not even sure how I'm going to work around understanding where we are with that if this functionality doesn't work, maybe I'm using the REST API.

            Because of a bunch of other limitations I've switched back to making Classic Jira projects for my new projects, but I'm unfortunately saddled with a Next-Gen project for this particular need.

            Ert Dredge added a comment - - edited I have the same issue as @probinson1 : project = <PROJECT> AND status = Done ...gets me over 600 results, while project = <PROJECT> AND status CHANGED TO Done ...gets only a single result.   The workaround " Renaming the columns to something different than the default value return the issues from the search"  maybe works in some cases?   If I try this query for some of the more unusually named statuses in my workflow it did get at least plausible results, and I checked one with the REST API and a shell script and confirmed that it's returning correct results. If I try the status "Blocked", though, I do not get correct results, and I didn't think that was one of the default statuses that was created with the project.  So I'm not feeling super confident in the workaround. Playing with using FROM and TO in the query doesn't seem to get at the correct numbers, either.   We have a key result for our team's quarterly goal which involves understanding who actually initially started work on an issue.  I'm not even sure how I'm going to work around understanding where we are with that if this functionality doesn't work, maybe I'm using the REST API. Because of a bunch of other limitations I've switched back to making Classic Jira projects for my new projects, but I'm unfortunately saddled with a Next-Gen project for this particular need.

            +1 any update about this problem?

            Renato Hawx added a comment - +1 any update about this problem?

            Robert Bono added a comment - - edited

            My institution will not be going ahead with our Atlassian Cloud plans if Atlassian does not respond to this ticket with a timeline for when they will fix this bug. The lack of documentation is astounding - it's such a basic, core feature, that no one would expect that it doesn't work in Next Gen. Project Managers are completely crippled by an inability to report on WHEN things were finished. 

            Honestly this is like building a car without the side mirrors. This ticket has been open for 14 months. This is shameful and it's indicative of a company with serious internal issues. Next Gen is supposed to be the wave of the future. I went out on a limb creating a plan we could never scale in Classic Projects, got it approved, only to discover that my plan is critically flawed because it wrongly assumes that a core feature of any task-management system is knowing when a task is finished. I shouldn't even have to type those words, because it's so basic and such a core thing that you'd need to be insane not to implement it, and you'd need to be extra-insane to know it's not working and continue t*elling your customers to use Next Gen* for 14 months when you knew it had an undocumented critical flaw making Next-Gen unfit for use.

            I will be meeting with management this week to discuss transitioning our plans to a different tool that works.

            Robert Bono added a comment - - edited My institution will not be going ahead with our Atlassian Cloud plans if Atlassian does not respond to this ticket with a timeline for when they will fix this bug. The lack of documentation is astounding - it's such a basic, core feature, that no one would expect that it doesn't work in Next Gen. Project Managers are completely crippled by an inability to report on WHEN things were finished.  Honestly this is like building a car without the side mirrors.  This ticket has been open for 14 months. This is shameful and it's indicative of a company with serious internal issues. Next Gen is supposed to be the wave of the future. I went out on a limb creating a plan we could  never scale in Classic Projects, got it approved, only to discover that my plan is critically flawed because it wrongly assumes that  a core feature of any task-management system is knowing when a task is finished.  I shouldn't even have to type those words, because it's so basic and such a core thing that you'd need to be insane not to implement it, and you'd need to be extra-insane to know it's not working and continue t*elling your customers to use Next Gen*  for 14 months when you knew it had an undocumented critical flaw making Next-Gen unfit for use. I will be meeting with management this week to discuss transitioning our plans to a different tool that works.

            As preciously mentioned the workaround is to rename the default swimlanes. This works in next-gen ie:

            project = "PROJECT" and status changed from "QA" to "TODO" on "2020-03-10"
            

            will return all issues that was moved from the QA column to the TODO column. 

            This will not work with the default swimlane names.

             

            Christian Hall added a comment - As preciously mentioned the workaround is to rename the default swimlanes. This works in next-gen ie: project = "PROJECT" and status changed from "QA" to "TODO" on "2020-03-10" will return all issues that was moved from the QA column to the TODO column.  This will not work with the default swimlane names.  

            William added a comment -

            Hi there,

            I had a quick chat with the team that handles JQL and they told me that historical searchers are unfortunately not supported in next-gen projects yet.

            Regards,

            Will

            William added a comment - Hi there, I had a quick chat with the team that handles JQL and they told me that historical searchers are unfortunately not supported in next-gen projects yet. Regards, Will

            Phil added a comment - - edited

             I have a similar problem, but haven't found any workaround.

            This query returns 205 results:

            project = "<PROJECT NAME>" AND status = "To Do"

             I expect the following query to also give me some results, at least 205 of them:

            project = "<PROJECT NAME>" AND status WAS "To Do"

             However no issues are returned (same project).

            According to https://support.atlassian.com/jira-core-cloud/docs/advanced-search-reference-jql-operators/#Advancedsearching-operatorsreference-WAS, I had expected this to work, and it does on classic projects, but not on any next-gen projects.

            https://community.atlassian.com/t5/Jira-Software-questions/JQL-WAS-and-WAS-IN-operators-not-working/qaq-p/1388783?utm_source=atlcomm&utm_medium=email&utm_campaign=immediate_general_reply&utm_content=topic

            Phil added a comment - - edited  I have a similar problem, but haven't found any workaround. This query returns 205 results: project = "<PROJECT NAME>" AND status = "To Do"  I expect the following query to also give me some results, at least 205 of them: project = "<PROJECT NAME>" AND status WAS "To Do"  However no issues are returned (same project). According to  https://support.atlassian.com/jira-core-cloud/docs/advanced-search-reference-jql-operators/#Advancedsearching-operatorsreference-WAS , I had expected this to work, and it does on classic projects, but not on any next-gen projects. https://community.atlassian.com/t5/Jira-Software-questions/JQL-WAS-and-WAS-IN-operators-not-working/qaq-p/1388783?utm_source=atlcomm&utm_medium=email&utm_campaign=immediate_general_reply&utm_content=topic

            With further investigation, it seems to happen when you have a status with the same name as one of the basic statuses (without scope). If you rename your row, it works

            Antoine Emond added a comment - With further investigation, it seems to happen when you have a status with the same name as one of the basic statuses (without scope). If you rename your row, it works

            Petter Gonçalves added a comment - https://community.atlassian.com/t5/Jira-questions/How-to-find-reopened-bugs-in-Jira-using-advanced-search-feature/qaq-p/1137432

            Al Deger added a comment -

            +1

            Al Deger added a comment - +1

            Bill added a comment -

            My team needs this, please! Confusing and a waste of my teams time trying to understand why a simply query was not being returned. 

            Bill added a comment - My team needs this, please! Confusing and a waste of my teams time trying to understand why a simply query was not being returned. 

              pswiecicki Piotr Swiecicki
              mtokar Michael Tokar
              Affected customers:
              145 This affects my team
              Watchers:
              151 Start watching this issue

                Created:
                Updated:
                Resolved: