Getting Jira Custom Field Metadata Names

You can add Jira custom fields to your Jira or Jira Cloud source, to enhance the search experience such as by providing facets on important custom fields.

You can easily do that from the Administration console, but when you fill the Metadata Name box, you need to know the name of the metadata visible to your source (see Adding Fields to a Source).

You can deduce a Jira custom field metadata name as follows.

To get the metadata name of a Jira custom field

  1. Access your Jira or Jira Cloud instance.

  2. Search issues in Advanced mode:

    1. In the main menu select Issues and then Search for issues.

    2. In the toolbar, click Advanced to switch to the advanced mode using JQL.

    3. In the JQL search box, start typing the custom field name for which you want the name.

      JIRA-SearchMetaName1

      In the drop-box that appears below the JQL search box, custom field names are of the form:

      CustomFieldName - cf[n]

      where n is the custom field id.

      A custom Jira metadata is made available to Coveo Cloud sources with the following name format:

      fields.customfield_n

      Some custom fields, such as those with predefined values available from a drop-down menu in the Jira user interface, may return a JSON value with other attributes and their values. In this case you must rather enter the Metadata Name in the format:

      fields.customfield_n.attributeName

      You entered the Metadata Name as fields.customfield_12345 and once you rebuilt the source, this custom Coveo field for a result contains the following JSON:

       {  "self": "https://myjira.atlassian.net/rest/api/2/customFieldOption/11206",  "value": "Core",  "id": "11206" }
      

      What you really want for your field is Core, the value of the value attribute, so you rather enter the Metadata Name as follows:

      fields.customfield_12345.value

    • Similarly, standard Jira fields and there attributes are made available to Coveo Cloud sources with the following name format:

      fields.fieldname.fieldattribute

      You can get the name attribute of the status standard field with:

      fields.status.name

    • When your Jira content is indexed, you can see the already available fields from your Coveo JavaScript search page, by alt-double-clicking a Jira result.

      In the debug panel that appears, in the Fields section, all the fields starting with @ji are Jira fields with there corresponding values for the double-clicked item.

  3. In the administration console, add a field:

    In the Coveo Cloud administration console Add a New Field panel, use the fields.customfield_n form to enter the Metadata Name value (see Adding Fields to a Source).

    Admin-AddAJIRACustomField1