• About Jira Software modules
  • Admin Page
  • Administration UI locations
  • Boards
  • Build
  • Dashboard Item
  • Deployment
  • Development Tool
  • Dialog
  • Entity Property
  • Feature Flag
  • Global Permission
  • Home container
  • Issue Background Script
  • Issue Content
  • Issue Field
  • Issue Glance
  • Issue view UI locations
  • Keyboard Shortcut
  • Page
  • Project Admin Tab Panel
  • Project Page
  • Project Permission
  • Project settings UI locations
  • Project sidebar
  • Remote Link
  • Report
  • Search Request View
  • Tab Panel
  • Time Tracking Provider
  • User profile menu
  • Web Item
  • Web Panel
  • Web Section
  • Webhook
  • Workflow Condition
  • Workflow Post Function
  • Workflow Validator

Issue Field

This module allows the app to add a new issue field to Jira.

The key of the field, that can be used to reference the field in the REST API, is: `$(app-key)__$(module-key)`.

Available options for fields of the `single_select` or `multi-select` type are managed with the REST API for issue field options.

Example

For a full add-on example, see issue field example app.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
{
  "modules": {
    "jiraIssueFields": [
      {
        "description": {
          "value": "field with team"
        },
        "type": "single_select",
        "extractions": [
          {
            "path": "category",
            "type": "text",
            "name": "categoryName"
          }
        ],
        "name": {
          "value": "Team"
        },
        "key": "team-field"
      }
    ]
  }
}

Properties

description

Type
i18n Property
Required
Yes
Description

Description of the issue field. This will be displayed for the user under the field in the create or edit issue view.

Represents a string that can be resolved via a localization properties file. You can use the same i18n Property key and value in multiple places if you like, but identical keys must have identical values.

Example

1
2
3
{
  "value": "My text"
}

Properties

value
Type
string
Required
Yes
Description

The human-readable default value. This will be used if no translation exists. Only the following HTML tags are supported: b, i, strong, em, and code.

i18n
Type
string
Description

The localization key for the human-readable value. Translations for the keys are defined at the top level of the add-on descriptor.


key

Type
string
Max length
100
Required
Yes
Pattern
^[a-zA-Z0-9-]+$
Description

A key to identify this module.

This key must be unique relative to the add on, with the exception of Confluence macros: Their keys need to be globally unique.

Keys must only contain alphanumeric characters and dashes.

The key is used to generate the url to your add-on's module. The url is generated as a combination of your add-on key and module key. For example, an add-on which looks like:

1
2
3
4
5
6
7
8
{
    "key": "my-addon",
    "modules": {
        "configurePage": {
            "key": "configure-me",
        }
    }
}

Will have a configuration page module with a URL of /plugins/servlet/ac/my-addon/configure-me.


name

Type
i18n Property
Required
Yes
Description

A human readable name.

Represents a string that can be resolved via a localization properties file. You can use the same i18n Property key and value in multiple places if you like, but identical keys must have identical values.

Example

1
2
3
{
  "value": "My text"
}

Properties

value
Type
string
Required
Yes
Description

The human-readable default value. This will be used if no translation exists. Only the following HTML tags are supported: b, i, strong, em, and code.

i18n
Type
string
Description

The localization key for the human-readable value. Translations for the keys are defined at the top level of the add-on descriptor.


type

Type
string
Allowed values
  • string
  • STRING
  • text
  • TEXT
  • rich_text
  • RICH_TEXT
  • single_select
  • SINGLE_SELECT
  • multi_select
  • MULTI_SELECT
  • number
  • NUMBER
  • read_only
  • READ_ONLY
  • Required
    Yes
    Description

    The type of the field. The following types are available:

    • number Allows to set a number.
    • string Allows to set a string, supports exact matches in JQL.
    • text Allows to set a string, supports fuzzy search in JQL (with the "~" operator).
    • rich_text Allows to set multi-line text in Jira, and supports fuzzy search in JQL. Note: If you migrate from text to rich_text for an already existing field, the data won't be migrated.
    • single_select Allows to select one value from a predefined set. The Issue field options REST API can be user to manage available values.
    • multi_select Allows to select multiple values from a predefined set. The Issue field options REST API can be used to manage available values.
    • read_only Displays a given issue property, not editable by users.

    extractions

    Type
    [Issue Field Option Property Index, ... ]
    Description

    Extractions used for JQL search. This is valid only when the type is single_select or multi_select.


    property

    Type
    Issue Field Property
    Description

    The property that stores the field value.

    Required when the type is read_only, otherwise not used.

    Defines an issue property that will store the value for the issue field of the read_only type.

    Example

    1
    2
    3
    4
    5
    {
      "path": "comments.count",
      "key": "statistics",
      "type": "number"
    }
    

    Properties

    key
    Type
    string
    Required
    Yes
    Description

    The key of the issue property.

    path
    Type
    string
    Required
    Yes
    Description

    The path to the value in the JSON object.

    For instance, for JSON "{"label": {"color": "red", "text":"connect"}} the valid path referencing the color is label.color.

    type
    Type
    string
    Required
    Yes
    Description

    The type of the referenced value. It will affect how the value is interpreted and displayed, and how the field behaves in JQL.

    The type can be one of the following:

    • number, which is displayed as a number and allows the range ordering and searching on this field.
    • string, which supports a string, for example "example text", and a list of strings, for example ["example text1", "example text2"]. The string is displayed as is and enables a search for matching phrases. The list is displayed as comma-separated values and enables a search for matches to any phrase from the list.
    • date, which is displayed as a date with time and allows date-based searching.

      The value is expected to be a date string in one of the following formats:

      • [YYYY]-[MM]-[DD]
      • [YYYY]-[MM]-[DD]T[hh]:[mm]Z
      • [YYYY]-[MM]-[DD]T[hh]:[mm]+[hh]:[mm]
      • [YYYY]-[MM]-[DD]T[hh]:[mm]-[hh]:[mm]

      See ISO_8601 standard for reference.


    template

    Type
    Issue Field Template
    Description

    The template used to render options. This is only valid when the type is single_select or multi_select.

    Defines the template used to render issue field options in the UI view.

    Properties

    type
    Type
    string
    Required
    Yes
    Description

    Type of the template.

    url
    Type
    string
    Required
    Yes
    Description

    If the type is 'link' then this specifies the URL template for the link. It is possible to use context parameters in the template.

    The URL may be relative or absolute. If it is the former, then the Jira context path will be prepended automatically.

    The following context parameters are available:

    • option.id, option.key, option.properties
    • issue.id, issue.key
    • project.id, project.key
    • user.id (deprecated), user.name (deprecated), user.accountId


    • System status
    • Privacy
    • Developer Terms
    • Trademark
    • Cookie Preferences
    • © 2019 Atlassian