The issue flagging functionality is not working as expected on board and sprint pages (missing flags, no highlighting, errors)
Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Summary
In Jira Software 7.1.0, a new feature was introduced which allows to flag Jira issues from Agile/Kanban boards, and which is explained in the documentation Flagging an issue.
When the feature works as expected, the following behavior is observed:
Issues that have been flagged are highlighted, and a red flag icon should be displayed on the left side:
For issues that have been already flagged, when clicking on the flagged issue, we should see the Remove flag option:
When the feature does not work as expected, you might face one of the symptoms listed below. The purpose of this KB article is to list all the known scenarios where the fagging feature does not work as expected, and how to fix them.
Symptom 1
Issues that have been flagged are not highlighted in the board and also no red flag is shown on the left of these issues:
For these already flagged issues, the Add flag button is showing instead of the Remove flag button:
Symptom 2
When a user tries to add a flag to an issue, the error below is thrown in the UI
1
A flag cannot be added to ABC-123 (due to the configuration of the custom field "Flagged").
When a user tries to remove a flag to an issue, the error below is thrown in the UI
1
A flag cannot be removed from ABC-123 (due to the configuration of the custom field "Flagged").
The screenshot below is showing these 2 errors:

Symptom 3
When a user tries to add a flag to an issue, the error below is thrown in the UI:
1
Invalid value '10100' passed for customfield 'Flagged'. Allowed values are:

Symptom 4
When a user tries to use the Add flag and comment action to the issue, the error below is thrown in the UI. ℹ️ Note that using the Add Flag action (without comment) will work though.
1
Exception: Uncaught TypeError: Cannot read property 'trim' of undefined

Environment
Jira Software Server/Data Center 7.1.x and above.
Cause
Symptom 1 - Root Cause 1
The search template of the Flagged field is set to Multi Select Searcher by default. If the template is set to anything else, this field won't be searchable (it will not be added to the search indexes), and unexpected behaviors will be observed (such as the ones described in this article).
Symptom 1 - Root Cause 2
The Flagged field is configured as hidden in the Field Configuration scheme associated to the project that the flagged issue belongs to.
Symptom 2 - Root Cause
The configuration scheme of the Flagged field has a context that is not including all projects or all types. In such case, if an issue belongs to a project that is not included in the field context configuration, it will not be possible to add or remove the flag from it, and the error A flag cannot be add/removed from ABC-123 will be thrown in the UI.
Symptom 3 - Root Cause
The Flagged field has more than 1 configuration scheme associated to it. In such case, it will not be able to flag issues in any project associated with the 2nd configuration scheme. The error Invalid value '10100' passed for customfield 'Flagged' will be thrown in the UI.
This symptom was reported as a bug in https://jira.atlassian.com/browse/JSWSERVER-20278.
Symptom 4 - Root Cause
The Jira issue that is impacted by this symptom belongs to a JSM (Jira Service Management) project instead of a JSW (Jira Software) project, and we are running into the bug https://jira.atlassian.com/browse/JSWSERVER-14817. Due to this bug, the error Exception: Uncaught TypeError: Cannot read property 'trim' of undefined will be thrown in the UI.
Diagnosis
Regardless of the symptom you are facing, the very first diagnosis step consists in identifying the Flagged custom field which is used by the Flagging functionality:
Go to the page ⚙ > Issues > Custom Fields
Look for the Flagged field and check if you get multiple results
If you only get 1 result, then this field it the one used by the Flagging functionality, and you can move on to all the Diagnosis for Root Cause X sections
If you get more than 1 result as illustrated in the screenshot below, move on to the next step
Once way to identify which field is the actual one being used by the Flagging feature is to identify the Flagged field which has the description "Allows to flag issues with impediments."
Another way to identify is it to run the SQL query below in the Jira Database:
1
SELECT pn.id, entity_name, entity_id, property_key, propertyvalue, cfname FROM propertynumber pn JOIN propertyentry pe ON pe.id = pn.id LEFT OUTER JOIN customfield cf ON pn.propertyvalue = cf.id WHERE property_key like 'GreenHopper.Flag.Default.customfield.id';
The propertyvalue column will contain the ID of the relevant field.
Take note of this ID and navigate to the URL below to go to the configuration of the Flagged field after replacing <JIRA_BASE_URL> with Jira's base URL and <PROPERTYVALUE> with the value from the propertyvalue column:
1
<JIRA_BASE_URL>/secure/admin/ConfigureCustomField!default.jspa?id=<PROPERTYVALUE>
Diagnosis for Symptom 1 - Root Cause 1
Log into Jira as a Jira Administrator
Check the search template used by the Flagged custom field, by following the steps below
Go to the page ⚙ > Issues > Custom Fields
Search for the flagged field, then go to the page Actions > ... > Edit (on the right side of the field)
If the search template is set to None, then this root cause is relevant and you can move on to the Solution for Symptom 1 - Root Cause 1 section
Diagnosis for Symptom 1 - Root Cause 2
Log into Jira as a Jira Administrator
For the project that the flagged issue belongs to, go to the page Project Settings > Fields,
Click on Actions > Edit, as shown in the screenshot below:
You will be redirected to the page showing the Field Configuration associated to that project. Scroll down all the way to the Flagged field and check if the Show button is showing next to this field, as shown in the screenshot below:
If that's the case, then it means that the field was hidden for that specific project. In that case, this Root Cause is relevant
Diagnosis for Symptom 2 - Root Cause
Log into Jira as a Jira Administrator
Check the Configuration Scheme(s) used by the Flagged custom field, by following the steps below:
Go to the page ⚙ > Issues > Custom Fields
Search for the flagged field, then go to the page Actions > ... > Configure (on the right side of the field)
If you see that only specific projects (or issue types) are in the context of the Configuration Scheme (as illustrated below) and if the impacted Jira issue does not belong to these projects/issue types, then this Root Cause is relevant:
Diagnosis for Symptom 3 - Root Cause
Log into Jira as a Jira Administrator
Check the Configuration Scheme(s) used by the Flagged custom field, by following the steps below:
Go to the page ⚙ > Issues > Custom Fields
Search for the flagged field, then go to the page Actions > ... > Configure (on the right side of the field)
If you see that there is more than 1 Configuration Scheme associated to the custom field, then this Root Cause is relevant.
Diagnosis for Symptom 4 - Root Cause
Check the type of the project that the impacted issues belong. If the project is a JSM (Jira Service Management) project, then this Root Cause is relevant.
Solution
Solution for Symptom 1 - Root Cause 1
Go to the page ⚙ > Issues > Custom Fields
Search for the flagged field, then go to the page Actions > ... > Edit (on the right side of the field)
Set the search template to Multi Select Searcher and click on the Update button
Go to ⚙ > System > Indexing and re-index the Jira application for the search template update to be effective (you can run either a background index or lock index)
Refresh the board where you observed the issue and verify that the flagging feature works as expected
Solution for Symptom 1 - Root Cause 2
From the Field Configuration page where you found that the Flagged field was hidden (by following the steps in Diagnosis for Root Cause 2), click on the Show link next to the Flagged field
Go to ⚙ > System > Indexing and re-index the Jira application for the field configuration update to be effective (you can run either a background index or lock index)
Refresh the board where you observed the issue and verify that the flagging feature works as expected
Solution for Symptom 2 - Root Cause
Go to the Flagged field configuration page
Ensure that all projects and issue types are added to the context of the configuration scheme used by this field
Solution for Symptom 3 - Root Cause
Go to the Flagged field configuration page
Ensure that this field only has 1 configuration scheme associated to it (the default one) by removing all the other configuration schemes
Solution for Symptom 4 - Root Cause
For the impacted issues that belong to a JSM project, add the flag and the comment separately instead of using the Add flag and comment action.
Was this helpful?