In a team-managed project JQL is not working if it contains status WAS 'statusName'

Platform Notice: Cloud - This article applies to Atlassian products on the cloud platform.

Symptoms

When using JQL to search for issues in a team-managed project, if JQL contains status WAS 'statusName' it does not consider the timeline and returns all results.

Example of queries:

project='Project Name' AND status WAS IN ('In Progress') DURING('2021-03-06','2021-03-08')
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)

Causes

Due to a known bug the JQL query is not working correctly for team-managed projects and returns all results.

Workaround

Workaround is to use status ID instead of status name in JQL query.

You need to start with locating your team-managed project's ID:

  1. Go to https://<instance name>.atlassian.net/rest/api/3/project

  2. Identify your project: you can use your browser(Ctrl+F / Cmnd+F) to search for Project key or Project name.

  3. The ID is located just before Project key. Example:

    • id":"10101","key":"TMP","name":"Team-Managed Project"

Then you need to get the status ID which corresponds the status in JQL query:

  1. Go to https://<instance name>.atlassian.net/rest/api/3/status

  2. Search for your Project ID. Statuses with their IDs will be listed next to it. These are usually five digits in length and should start with 10, 100 or similar (depending how many custom statuses are on your instance).

  3. Copy the relevant Status ID

Use obtained ID in your JQL query - eg. "Status was 10103".

Example of queries:

project='Project Name' AND status WAS 10103 DURING('2021-03-06','2021-03-08')
status was 10103 after "2022-03-09" AND status in ("Ready for Release", Done, Closed, Declined, Postponed)
status was 10103 after endOfDay(-21d) AND status in ("Ready for Release", Done, Closed, Declined, Postponed)


Last modified on Nov 19, 2024

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.