JQL find flagged issues

Sven Koch November 2, 2017

What ist the JQL to find the issues which have a flag in the backlog?

Flagged = Impediment from the descrpition in https://confluence.atlassian.com/agile/jira-agile-user-s-guide/working-with-issues/flagging-an-issue *does not work*

8 answers

1 accepted

20 votes
Answer accepted
Warren
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.
November 2, 2017

Hi Sven

The Flagged item is a strange one.

To check if an item is flagged or not use

Flagged is EMPTY

Flagged is not EMPTY
Sven Koch November 2, 2017

"Field 'Flagged' does not exist or you do not have permission to view it."

I am JIRA Admin

Like # people like this
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 2, 2017

Admin rights don't matter to what you can or can't see on issues.  Project rights determine that.

This error message means either that the field does not exist, or it is not used in any project you can see.

Do you have Jira Software installed, and have you got access to at least one Software project?

Like # people like this
Sven Koch November 2, 2017

In the German edition the field flagged is called "markiert" and 

"markiert  is not EMPTY" works

Like # people like this
Eimantas Puscius August 8, 2018

"flagged is not EMPTY" works perfectly fine.

Like # people like this
Deleted user January 17, 2019

In the German edition (JIRA Software 7.8) the field flagged is called "Gekennzeichnet" and 

"Gekennzeichnet is not EMPTY" works

Like Mario Rowies likes this
Sarah Ahmed August 29, 2019

"flagged is not EMPTY" does not pull any results for me after the year 2018.  I see 1 JIRA story dated January 2018, but I just added a bunch of flags to my stories today.  They are not pulling in my search results. 

Warren
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.
August 29, 2019

Hi @Sarah Ahmed 

You'll notice in my earlier reply that I use an uppercase F for Flagged, whereas you're showing flagged. The Jira field names are case sensitive. If you go into the filter screen and start typing flag then the "intellisense" will tell you what the correct wording is (see below), but obviously for other languages typing flag won't work.

Screenshot_1.jpg

Sarah Ahmed August 30, 2019

Still doesn't work for me.  I get no results when there should be results

 

I've tried.. narrowing it down to project in ("....") AND Flagged = impediment

also tried project in ("...") AND Flagged is not EMPTY  

no results. We are on the server version

Tizz December 11, 2019

I am in the cloud version. I tried Flagged is not EMPTY and the same error: "Field 'Flagged' does not exist

I tried also: 

  1. flagEnabled ~ "true"
  2. flagKEY is not EMPTY

They do not give any error but they neither give any results on the board quick filters where I have alot of them.

Like Deleted user likes this
Deleted user March 17, 2020

I just tried 

 

project = "X" AND issuetype in (Story) AND Flagged is not EMPTY ORDER BY updated DESC

and I get a list of issues that were flagged, and the number of days listed in the "Flagged" field next to the word "Impediment".

Paul Stasiak July 29, 2021

You mean "are flagged" not "were flagged". I can't find a way to search for issues that were ever flagged unless they are currently flagged.

Dawid S. June 9, 2022


This one works perfect in Jira Cloud:

Flagged is not EMPTY

Like Karla Gonçalves likes this
Asbin Maharjan August 30, 2023

Thanks! It worked for me.2.png

0 votes
Asbin Maharjan August 30, 2023

image.png

0 votes
Roger romero rojas July 22, 2022

Hi everybody,

that I have to configure so that the flagged field is not shown when registering an incident.

0 votes
Leslie Munday August 31, 2021

I just typed 'Flagged is not empty' into the search field and it worked.

Paul Stasiak August 31, 2021

Does it work for items that are not currently flagged but were at one point in time?

Like Richard Carter likes this
WW
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.
September 1, 2021

@Paul Stasiak ,

I would think that the search you're suggesting would work about the same as any other field's history of values.

Try using the WAS operator in your search.

The "WAS" operator is used to find issues that currently have or previously had the specified value for the specified field.

For example: 

Flagged WAS not EMPTY

 or

Flagged WAS Impediment
Matt Parks
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.
April 7, 2022

Unfortunately, historical searches do not work on the Flagged field:

2022-04-07_16-01-43.png

Like Deleted user likes this
0 votes
Martin Boehme
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 21, 2021

I've just found out (under Jira DC 8.18.0) that "Flagged" is created when the first issue gets flagged. For the name, it will use the language that the user who flagged the issue is currently using.

Before that, there will be no such field.

0 votes
WW
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.
June 16, 2021

The "Flagged" field must be on a screen in your project in order for a JQL search on it to work.

You can still add a flag to an issue using an agile board and right clicking the issue, but you cannot filter by the field unless you have it on a screen.

If it is on a screen, you can also "flag" an issue by updating the field's value to check the Impediment checkbox that appears when you edit the field value.

JQL could be:

Flagged=Impediment

or

Flagged is not EMPTY
WW
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.
September 1, 2021

Someone on our team also figured out that if you have more than the default field context on the Flagged field, the search won't work, even if the field is on a screen in the project.

It's a bug.

Like Deleted user likes this
Deleted user October 1, 2021

Definitely sounds like a DEFECT.

WW
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.
October 1, 2021

The person on our team looking into this issue discovered that he had not checked a basic setting, although the context thing may still be a bug.  I'm not sure.

In the Field Configuration, the Flagged field was set to hidden, because we had it visible previously, but then had to remove it from screens.  So, in a way to make it easier to update, someone just hid the field.

Moral of this story: check the basics first. :)

0 votes
Amadou Diallo February 4, 2021

Funny but "Big Rocks" is not EMPTY worked for me.

0 votes
robert.nadon
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.
August 12, 2020

I had to actually flag an issue to make it work.  Until an issue was flagged I got "Flagged" not found.   And I used for a Flagged = Impediment. and it work perfectly after I flagged an issue.

Raquel Toscano January 20, 2021

It only works when you filter by "Flagged[Checkboxes]" =Impediment 

In the case you want to filter those which are not Flagged ("Flagged[Checkboxes]" =! Impediment ) it's not working at all

Like Gertjan Fober likes this
Gertjan Fober February 21, 2022

That worked for me thanks!

Suggest an answer

Log in or Sign up to answer