I have developed a customfield type extending SelectCFType. I use optionsManager to add and manage values. Everything seems to be working on this end.
I add the options like this
optionsManager.createOption(fieldConfig, null, sequence++, item.getName());
and they seem to be correctly persisted in the database.
The problem is with searching. I have added customfield-searcher and linked it to my customfield - it shows correctly when I try to edit customfield and set searcher.
<customfield-searcher key="advanced-select-list-cf-type-searcher" i18n-name-key="com.principal.jira.advancedSelectList.customFieldSearcher.name"
class="com.principal.jira.advancedSelectList.AdvancedSelectListSearcher">
<description key="com.principal.jira.advancedSelectList.customFieldSearcher.description"/>
<resource type="velocity" name="search" location="templates/plugins/fields/edit-searcher/search-multiselect.vm"/>
<resource type="velocity" name="view" location="templates/plugins/fields/view-searcher/view-searcher-multioption.vm"/>
<valid-customfield-type package="com.principal.jira.advancedSelectList" key="advanced-select-list-cf-type"/>
</customfield-searcher>
public class AdvancedSelectListSearcher extends MultiSelectSearcher implements SortableCustomFieldSearcher {
public AdvancedSelectListSearcher()
{
super(new JiraComponentLocator(), JiraComponentFactory.getInstance());
}
}
But when I go to search for issues and try to search by my customfield, it doesnt display any options, it just says “No Matches”. I thought it would take the options from the OptionsManager, but it seems to be ignoring them.