Just a heads up: On March 24, 2025, starting at 4:30pm CDT / 19:30 UTC, the site will be undergoing scheduled maintenance for a few hours. During this time, the site might be unavailable for a short while. Thanks for your patience.

×
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

JQL to find last status

Mike Whitlock
Contributor
May 27, 2015

Hi.  I need a filter to show issues that transition from one status to another (the business team needs to know when an issue comes in their queue if it came from the normal approval or if it was rejected back up to them, since each require different actions).

The workflow goes 'New'->'Open'->'In Review'->'In Approval'->'Closed'... if an issue is rejected while 'In Approval' it goes back to 'In Review'.

 

Is it possible to write JQL so the team knows if the issue came into 'In Review' from 'Open' or from 'In-Approval'?

 

I tried...

 

project = ITCM AND status changed from "In Approval" to "In Review" and status = "In Review"

 

but... when an issue is rejected back to 'In Review' it can be sent back to 'Open' if more information is needed.  Then, the issue will move from Open to In Review again.  My filter above catches these because that status transition has happened in the lifecycle but I don't want those reported. 

 

So, is there a why to use JQL to get the last status or the last transition?  Then, I could write 2 filters one where issues go from 'Open->In Review' and one where issues went from 'In Approval->In Review'.

 

Any help is appriecated.

 

Thanks,

Mike

1 answer

1 accepted

3 votes
Answer accepted
Marcus Silveira
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 27, 2015

Hi Mike,

I believe we could achieve this by creating a separate filter for the issues that went from "In Review" to Open and remove the results of this filter from the original filter, like the following.

Filter 1:

status changed from "In Review" to Open

Filter 2:

project = ITCM AND status changed from "In Approval" to "In Review" and status = "In Review" and NOT filter = <filter 1 id>

We just need to get the ID for the filter 1 from the URL and replace it on the last part of the filter above.

Hope this helps

Mike Whitlock
Contributor
May 27, 2015

Thanks Marcus that worked!!!!

Writer
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 15, 2020

That was informative for me as well. I wanted to show previous status in issue list view or on dashboard. Is there any field available ?

Gaurav Malik
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
September 8, 2020

Q: That was informative for me as well. I wanted to show previous status in issue list view or on dashboard. Is there any field available ?

 

Any Update ??

Suggest an answer

Log in or Sign up to answer