Fields missing from JQL auto complete due to missing customfieldsearcherkey
Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.
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
Problem
Fields do not appear in auto complete when using advanced search in Issue Navigator. This has been seen after upgrades.
Diagnosis
Check the custom field in the database to see if the "customfieldsearcherkey" is populated.
Use the following to obtain list of custom fields:
SELECT id,cfname,customfieldsearcherkey FROM customfield;
- Find custom field in the list
- If the customfieldsearcherkey is empty then you may be affected by this issue.
If customfieldsearcherkey is empty, proceed to Resolution and attempt to obtain the correct customfieldsearcherkey for this customfield
Cause
It is unknown how the data got into this state.
Resolution
Step 1: Obtain Correct Value
First, obtain the correct "customfieldsearcherkey" for the field and add it to the database.
If you find that the customfieldsearcherkey is empty in all cases then you may be affected by a different problem. Contact Atlassian Support for assistance. Provide the following when contacting support:
- Link to this article
- Results of the diagnosis database query
- Support Zip
Methods to obtain correct value:
1) Look at another instance of JIRA with this same custom field
- This may be a new instance you set up to get the correct value, or it could be an existing instance of JIRA that is the same version and has the same custom field.
2) Look in an XML backup that was created before this problem occurred
- Search for "<CustomField id=######" where ###### is the ID of the field identified in the Diagnosis section
Step 2: Add Value to Database
Always back up your data before performing any modifications to the database. If possible, test any alter, insert, update, or delete SQL commands on a staging server first.
1) Make a backup of your data
2) Shutdown JIRA
3) Add value using the following SQL, or similar SQL:
UPDATE customfield
SET customfieldsearcherkey = 'XXXXXXXXXXXXX'
WHERE id = ######;
----NOTES----
- Replace "XXXXXXXXXXXXX" with the correct customfieldsearcherkey
- Replace "######" with the ID of the field identified in the diagnosis step
4) Start JIRA
5) Reindex JIRA
Examples
The following is an example of how the Epic custom fields appear. These fields were create by JIRA Software (JIRA Agile).
- These examples show the correct customfieldsearcherkey for these particular fields.