Documentation for JIRA 4.2. Documentation for other versions of JIRA is available too.
The custom field plugin module allows you to add new custom field types and searchers to JIRA.
The root element for the custom field type plugin module is customfield-type
. It allows the following attributes and child elements for configuration:
Name |
Required |
Description |
Default |
---|---|---|---|
class |
|
Unable to render {include} The included page could not be found. The Java class of the custom field type module. Classes must implement com.atlassian.jira.issue.customfields.CustomFieldType , but there are several concrete implementations that should address the majority of users' needs, including text fields, text areas, user pickers, etc. See the CustomFieldType javadoc for details. |
|
key |
|
Unable to render {include} The included page could not be found. I.e. the identifier of the custom field type module. |
N/A |
i18n-name-key |
|
Unable to render {include} The included page could not be found. |
|
name |
|
Unable to render {include} The included page could not be found. I.e. the human-readable name of the custom field type module. |
The plugin key. |
Name |
Required |
Description |
---|---|---|
description |
|
A human-readable description of this custom field type plugin module. May be specified as the value of this element for plain text or with the |
resource type="velocity" |
|
Velocity templates that implement the custom field views. |
Here is the custom field JIRA defines for selecting users (taken from system-customfieldtypes-plugin.xml
):
<customfield-type key="userpicker" name="User Picker" class="com.atlassian.jira.issue.customfields.impl.UserCFType"> <description> Choose a user from the user base via a popup picker window. </description> <!-- this template is used on the view issue page --> <resource type="velocity" name="view" location="templates/plugins/fields/view-user.vm" /> <!-- this template is used on the create/edit issue pages --> <resource type="velocity" name="edit" location="templates/plugins/fields/edit-userpicker.vm" /> <!-- this template is used when viewing an issue as XML --> <resource type="velocity" name="xml" location="templates/plugins/fields/xml-user.vm" /> </customfield-type>
The root element for the custom field searcher plugin module is customfield-searcher
. It allows the following attributes and child elements for configuration:
Name |
Required |
Description |
Default |
---|---|---|---|
class |
|
Unable to render {include} The included page could not be found. The Java class of the custom field searcher. Classes must implement com.atlassian.jira.issue.customfields.CustomFieldSearcher , but there are several concrete implementations that can handle searching for JIRA's built-in fields. See the CustomFieldSearcher javadoc for more details. |
|
key |
|
Unable to render {include} The included page could not be found. I.e. the identifier of the custom field searcher module. |
N/A |
i18n-name-key |
|
Unable to render {include} The included page could not be found. |
|
name |
|
Unable to render {include} The included page could not be found. I.e. the human-readable name of the custom field searcher module. |
The plugin key. |
Name |
Required |
Description |
---|---|---|
description |
|
A human-readable description of this custom field searcher plugin module. May be specified as the value of this element for plain text or with the |
resource type="velocity" |
|
Velocity templates that implement the custom field searcher views. |
valid-customfield-type |
|
Defines the custom field types this searcher can apply to. The |
Here is the custom field searcher JIRA defines for searching users (also taken from system-customfieldtypes-plugin.xml
):
<customfield-searcher key="userpickersearcher" name="User Picker Searcher" class="com.atlassian.jira.issue.customfields.searchers.UserPickerSearcher"> <description> Allow to search for a user using a userpicker. </description> <!-- this template is used on the issue navigator search form --> <resource type="velocity" name="search" location="templates/plugins/fields/search-userpicker.vm" /> <!-- this element defines the valid custom field types for this searcher --> <valid-customfield-type package="com.atlassian.jira.plugin.system.customfieldtypes" key="userpicker" /> </customfield-searcher>
Types and searchers can be combined in different ways to produce new custom fields, for example a "user" custom field could take a simple text searcher (to enter the username as text) or a more complex "user picker searcher" (where the user is picked from a popup window).
For more details, see the How to create a new Custom Field Type.
To learn more about the custom field Velocity templates, see Custom field Velocity context unwrapped