Documentation for JIRA 4.2. Documentation for other versions of JIRA is available too.
Custom fields need a custom field searcher before you can search them in the Issue Navigator.
If a custom field type is a going to behave somewhat like an existing type, then you can reuse an existing searcher. For example, if you're creating a custom field type that's like a multi select list and want to reuse the default multi-select searcher, you could add the block below to your atlassian-plugin.xml (taken from system-customfieldtypes-plugin.xml
)
<customfield-searcher key="multiselectsearcher" name="Multi Select Searcher" i18n-name-key="admin.customfield.searcher.multiselectsearcher.name" class="com.atlassian.jira.issue.customfields.searchers.MultiSelectSearcher"> <description key="admin.customfield.searcher.multiselectsearcher.desc">Search for multiple values using a single select list.</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"/> <resource type="velocity" name="label" location="templates/plugins/fields/view-searcher/label-searcher-basictext.vm"/> <valid-customfield-type package="YOUR CUSTOM PACKAGE" key="YOUR CUSTOM FIELD KEY"/> </customfield-searcher>
which will enable searching for any text based, multi-select custom field type. When creating the custom field, you will now be able to select the multi-select searcher and your custom field should then be displayed in the Issue Navigator.
Note that "YOUR CUSTOM PACKAGE" refers to the package (ie. the module key) of the custom field that the searcher applies to.