Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,256,869
Community Members
 
Community Events
164
Community Groups

JQL find flagged issues

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*

6 answers

1 accepted

14 votes
Answer accepted

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

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

I am JIRA Admin

Like # people like this

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?

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

"markiert  is not EMPTY" works

Like Andreas Link likes this

"flagged is not EMPTY" works perfectly fine.

Like Devesh.Ameta likes this

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

"Gekennzeichnet is not EMPTY" works

"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. 

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

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

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 Marcelo Lopez likes this

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".

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.

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

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

Like Richard Carter likes this

@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

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

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

Like Marcelo Lopez likes this

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.

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

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 Marcelo Lopez likes this

Definitely sounds like a DEFECT.

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. :)

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

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.

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

That worked for me thanks!

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Jira Software

Upcoming changes to epic fields in company-managed projects

👋 Hi there Jira Community! A few months ago we shared with you plans around renaming epics in your company-managed projects. As part of these changes, we highlighted upcoming changes to epics on...

1,487 views 11 22
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you