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

            [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

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

                Created:
                Updated:
                Resolved: