Fields missing from JQL auto complete due to missing customfieldsearcherkey

Still need help?

The Atlassian Community is here for you.

Ask the community

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.

  1. Use the following to obtain list of custom fields:

    SELECT id,cfname,customfieldsearcherkey FROM customfield;
  2. Find custom field in the list
  3. 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.

Expand for XML backup example...
    <CustomField id="10002" customfieldtypekey="com.pyxis.greenhopper.jira:gh-epic-link" customfieldsearcherkey="com.pyxis.greenhopper.jira:gh-epic-link-searcher" name="Epic Link" description="Choose an epic to assign this issue to."/>
    <CustomField id="10003" customfieldtypekey="com.pyxis.greenhopper.jira:gh-epic-status" customfieldsearcherkey="com.pyxis.greenhopper.jira:gh-epic-status-searcher" name="Epic Status" description="Epic Status field for JIRA Software use only."/>
    <CustomField id="10004" customfieldtypekey="com.pyxis.greenhopper.jira:gh-epic-label" customfieldsearcherkey="com.pyxis.greenhopper.jira:gh-epic-label-searcher" name="Epic Name" description="Provide a short name to identify this epic."/>
    <CustomField id="10005" customfieldtypekey="com.pyxis.greenhopper.jira:gh-epic-color" customfieldsearcherkey="com.pyxis.greenhopper.jira:gh-epic-color-searcher" name="Epic Color" description="Epic Color field for JIRA Software use only."/>
Expand for database example...
select * from customfield where customfieldtypekey like '%epic%';


idcustomfieldtypekeycustomfieldsearcherkeycfnamedescriptiondefaultvaluefieldtypeprojectissuetype
10003com.pyxis.greenhopper.jira:gh-epic-statuscom.pyxis.greenhopper.jira:gh-epic-status-searcherEpic StatusEpic Status field for JIRA Software use only.



10004com.pyxis.greenhopper.jira:gh-epic-labelcom.pyxis.greenhopper.jira:gh-epic-label-searcherEpic NameProvide a short name to identify this epic.



10005com.pyxis.greenhopper.jira:gh-epic-colorcom.pyxis.greenhopper.jira:gh-epic-color-searcherEpic ColorEpic Color field for JIRA Software use only.



10001com.pyxis.greenhopper.jira:gh-epic-linkcom.pyxis.greenhopper.jira:gh-epic-link-searcherEpic LinkChoose an epic to assign this issue to.








Last modified on Aug 24, 2021

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.