Summary
Since CHANGE-3340, searchSuggestionsEnabled: true lets a Forge object custom field provide JQL suggestions for its searchAlias properties. It works for string-typed aliases, but it has no effect on number-typed aliases. This limitation is not documented.
Sample manifest
jira:customFieldType:
- key: sample-field
name: Sample field
description: Sample
type: object
searchSuggestions:
expression: “searchAlias == ‘textAlias’ ? [{value: ‘a’, label: ‘A’}] : searchAlias == ‘numberAlias’ ? [{value: ‘1’, label: ‘One’}] : []”
view:
formatter:
expression: “${value.text}”
schema:
properties:
text:
type: string
searchAlias: textAlias
searchSuggestionsEnabled: true
number:
type: number
searchAlias: numberAlias
searchSuggestionsEnabled: true
Steps to reproduce
- Deploy and install the app, then create a field of this type.
- In the JQL editor, type “Sample field.textAlias” = and “Sample field.numberAlias” = .
- Check GET /rest/api/3/jql/autocompletedata and GET /rest/api/3/jql/autocompletedata/suggestions?fieldName=“Sample field.numberAlias”&fieldValue=.
Expected result
Both aliases show the app-provided suggestions.
Actual result
- textAlias: “auto”: “true” in autocompletedata, and the suggestions are shown.
- numberAlias: no “auto” flag, no suggestions in the editor, and the suggestions endpoint returns {“results”:[]}.
Questions
- Is this intended? If so, could it be documented?
- If not, is support for number aliases planned?
Related documentation issue
The search suggestions example in the custom field docs uses quoted object keys ({‘value’: ‘USD’, …}), which is invalid Jira expression syntax (IDENTIFIER or } expected). Unquoted keys ({value: ‘USD’, …}) work.