Looking to get a search result of Flagged issues where the Status has been updated while Flagged

Chris Ellis
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!
February 3, 2025

Hey there, 

We're using the Flagged functionality in Jira to identify our blocked items. I'm finding that we're spending a lot of time in certain meetings discussing blocked items that are in fact not blocked, with it just being a case of people forgetting to remove the Flag when obstacles are removed. This is a ways of working challenge that we are working through and I was hoping I could provide a view on our Jira Dashboards to help teams along their way with this challenge, and be more proactive in identifying where Flags need to be removed. 

I've been trying to create a JQL that shows Issues that are currently Flagged where the Status of the Issue has been updated/transitioned since the Issue has been Flagged...and failed miserably.  

Does anyone know of a JQL which would give me the search result that I'm looking for? 

2 answers

2 accepted

1 vote
Answer accepted
Mathew Lederman
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 3, 2025

Honestly, your best bet for this would be simply create an automation.

Depending on what you want to do the last step may change. Send an email, set a custom field of Flagged on Transition, notify via Slack, etc.

Obviously this won't work historically, but it will give you what you need for the future.

Transitioned while Flagged.png

 

Chris Ellis
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!
February 3, 2025
0 votes
Answer accepted
Rustem Shiriiazdanov
Contributor
February 3, 2025

Hi @Chris Ellis ,

Some bad news: Jira’s out-of-the-box JQL does not let you directly compare the date/time an issue was flagged against further status changes. It's becasue JQL can filter on fields in their current state (Flagged = Impediment) or query historical states with the WAS operator, but it does not allow you to do “field-to-field” or “field-to-event” date comparisons out of the box.
And there is there is no built-in ‘Flagged Date’ that you can filter against without additional tooling or custom fields.

As a workarounds you can:

1) Use an Automation to fill in “Flagged Date”. You will need to create a custom date field in Jira, named, f.i., "Date Flagged", "Flagged date" etc. And then use Jira Automation to set Date Flagged whenever Flagged is changed to “Impediment.” Having that set, you can create Jira list reports / filters based on the "Flagged date" value and the current status of the issues.

2) Use a Marketplace apps for some “Advanced JQL” or “enhanced search” capabilities. For instance, in ScriptRunner’s Enhanced Search, you can do queries like: issueFunction in expression("project=XYZ AND Flagged=Impediment", "issue.status.changed > issue.customfield_12345")

Regards,

Rustem

Chris Ellis
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!
February 3, 2025

Suggest an answer

Log in or Sign up to answer