Custom Field Plugin Module

JIRA Documentation

Index

The custom field plugin module allows you to add new custom field types and searchers to JIRA.

  1. Custom field types - these define the type of a custom field
  2. Custom field seachers - these define the ways a given type can be searched

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).

Here is an example of their respective descriptor elements:

<!--
The module class of a type must implement:
com.atlassian.jira.issue.customfields.CustomFieldType
and there are a number of abstract classes that can be extended,
for details see the bundled system custom field types
-->
<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 module class of a searcher must implement:
com.atlassian.jira.issue.customfields.CustomFieldSearcher
and again the are a number of useful abstract classes bundled.
-->
<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>

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

Labels:

Enter labels to add to this page:
Wait Image 
Looking for a label? Just start typing.