How-to configure the Customfield


Deprecated and Removed with 5.0

Statement starting from version 5.0: Due to some changes in Jira 9.0 we had to remove our custom fields. So they are no longer available since version 5.0.

Statement till version 5.0: The field types "JIRA Metadata - View project metadata field" and "JIRA Metadata - Calc. field" should no longer be used.

We recommend using "Scriptrunner for Jira" as a replacement.

Or our Post Function


This page will show you, the provided customfield types.

Be aware that you have to perform a project re-index, If you change some metadata value which was used within a searchable field. Otherwise the search-index of Jira will contain the old metadata value.


The configuration will be explained using the following examples.
Sample 1 : metadata that should be displayed at every Issue (eg. the account info (accounting.code))
Sample 2 : metadata that should be used to calculate an Issue related Amount (eg. the hour rate (accounting.hour.rate))
Sample 3 : metadata that should be displayed at the Project Metadata Tab (eg. contact person or the contact person phone number)

Step-by-step guide

  1. Value Configuration
    Go, as Project-Admin, into the project overview of the project of your choice (referenced as SampleProject) and select the tab JIRA Metadata.
    Enter the following data within the Edit Metadata Section:


    KeyValueGouphidden
    Sample 1accounting.codePK-23-Sys-3
    true
    Sample 2accounting.hour.rate12.5
    true
    Sample 3 aProject Contact PersonMayersonProject Infosfalse
    Sample 3 bProject Contact Person Phone555-454-3422Project Infosfalse
    Sample 3 cExternal Project KeyPK-23
    false

    The result:

  2. Field Configuration
    Let's make the Sample 1 and Sample 2 run within your JIRA, but login as JIRA Administrator first.
  3. Sample 1
    1. Goto Adminstration => Custom Fields
    2. Click "Add Custom Field"
    3. Select the Field Type: "JIRA Metadata - View project metadata field" and click "Next"
    4. Insert as Field Name: "Account Info"
    5. Select as Search Template the "Text Searcher" or "None" (do not select the "Exact Number Searcher" or the "Number Range Searcher")
    6. Click "Finish"
    7. Click "Edit Default Value" on the "Configure Custom Field: Account Info" page
    8. Insert "accounting.code" and click "Set Default"
    9. The "Account Info" field with the metadata value will be displayed for every issue of your SampleProject (you may have to re-login to see the result).
  4. Sample 2
    1. Goto Adminstration => Custom Fields
    2. Click "Add Custom Field"
    3. Select the Field Type: "JIRA Metadata - Calc. field" and click "Next"
    4. Insert as Field Name: "Amount"
    5. Select as Search Template the "Exact Number Searcher" or the "Number Range Searcher"
    6. Click "Finish"
    7. Click "Edit Default Value" on the "Configure Custom Field: Account Info" page

    8. Insert the following velocity script and click "Set Default"

      #set( $accRate = $metadataService.getMetadataValue($issue.projectObject, 'accounting.hour.rate') )
      #set( $issueTime = $math.div($issue.timeSpent, 3600) )
      #set( $amount = $math.mul($accRate, $issueTime) )
      $!amount
    9. The "Amount" field with the result of the above velocity script will be displayed for every issue of your SampleProject (you may have to re-login to see the result).


Background Information for Sample 2

You can use the following parameters within your velocity script:
issue (details: http://docs.atlassian.com/jira/latest/com/atlassian/jira/issue/Issue.html)
customField (details:  http://docs.atlassian.com/jira/latest/com/atlassian/jira/issue/fields/CustomField.html)
metadataService (provides the method: String/Double getMetadataValue(Object, String) e.g: $metadataService.getMetadataValue($issue.projectObject, 'accounting.hour.rate')
math (details: http://velocity.apache.org/tools/devel/generic/MathTool.html)
customFieldLookupService (provides the method: String/Double getCustomFieldValue(Issue, String) e.g: $!customFieldLookupService.getCustomFieldValue($issue, 'customfield_10000')