Map Jira Software Data Center custom fields
Map Jira Software Data Center custom fields
Once you have added a Jira Software source, you need to create mapping rules to index your content metadata.
Coveo automatically indexes the standard metadata of Jira Software issues, that is, the content of standard issue fields is indexed in generic Coveo fields such as firstname and date, as well as in Jira-specific Coveo fields starting with ji.
Custom Jira Software fields, however, are extracted as metadata but aren’t indexed by default.
The metadata names follow the pattern fields.customfield_<ID>, where <ID> is the unique numeric identifier of the custom field in Jira.
To index this metadata, you need to associate Jira custom field names with their unique IDs.
Finding the ID of a custom field
Ask a Jira Software administrator to follow these instructions to retrieve the identifiers of the desired custom fields.
Creating a Mapping Rule
Metadata from a custom Jira Software field is made available to Coveo sources with the following name format:
fields.customfield_<ID>
where <ID> is the custom field ID.
This is the format to use in your mapping rule.
For custom field 11102, your mapping rule is %[fields.customfield_11102].
With some custom fields, a mapping rule such as the one above may index a JSON object rather than a single value. This typically happens with custom fields whose possible values are predefined and available from a dropdown menu in the Jira Software user interface. In such case, your mapping rule should rather be in the format:
fields.customfield_<ID>.attributeName
where attributeName is the name of the desired JSON attribute.
You created the mapping rule %[fields.customfield_12345].
Once the source has been rebuilt, you see in the Content Browser that the corresponding Coveo field contains the following JSON object:
{ "self": "https://myjira.atlassian.net/rest/api/2/customFieldOption/12345", "value": "Core", "id": "12345" }
The value you want to index in your Coveo field is actually Core, that is, the value of the value attribute, so you update your mapping rule as follows:
fields.customfield_12345.value