Custom fields



General information

All "Manage custom fields" REST API available ONLY for JIRA administrators



Get all custom fields informations

Available since v. 1.65.* - added value lastValueUpdate and issuesWithValue for Jira Data Center >= 8.16


Method type - GET

URL:

  • {JIRA_URL}/rest/extender/1.0/customField/all


Response format - JSON

Example

{
   "customFields":[
      {
         "issuesWithValue": 0,
         "lastValueUpdate": "never", //String value when never updated
         "name":"Checkboxes",
         "id":"10000",
         "type":"Checkboxes",
         "key":"com.atlassian.jira.plugin.system.customfieldtypes:multicheckboxes"
      },
      {
         "issuesWithValue": 900,
         "lastValueUpdate": 1234567890, //timestamp value
         "name":"Radio Buttons",
         "id":"10001",
         "type":"Radio Buttons",
         "key":"com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons"
      },
      {
         "issuesWithValue": 0,
         "lastValueUpdate": "never",
         "name":"Select List (cascading)",
         "id":"10004",
         "type":"Select List (cascading)",
         "key":"com.atlassian.jira.plugin.system.customfieldtypes:cascadingselect"
      },
      {
         "issuesWithValue": 0,
         "lastValueUpdate": "never",
         "name":"Select List (multiple choices)",
         "id":"10003",
         "type":"Select List (multiple choices)",
         "key":"com.atlassian.jira.plugin.system.customfieldtypes:multiselect"
      },
      {
         "issuesWithValue": 0,
         "lastValueUpdate": "never",
         "name":"Select List (single choice)",
         "id":"10002",
         "type":"Select List (single choice)",
         "key":"com.atlassian.jira.plugin.system.customfieldtypes:select"
      }
   ]
}


Get configuration scheme for custom field

Method type - GET

URL:

  • {JIRA_URL}/rest/extender/1.0/customField/configScheme/field/{customFieldId}

where {customFieldId} is custom field id

Response format - JSON




Example URL:



  • {JIRA_URL}/rest/extender/1.0/customField/configScheme/field/10003

Example response JSON body

Fields “associatedProjects” and "issueTypes" for config scheme is available since 1.7.2 plugin version

{
   "customFieldSchemes":[
      {
         "name":"Default Configuration Scheme for Select List (multiple choices)",
         "id":"10104",
         "associatedProjects": [],
         "issueTypes": [
            {
               "name": "Global (all issues)",
               "id": "Global (all issues)"
            }
         ]
      },
      {
         "name":"Configuration Scheme for Select List",
         "id":"10105",
         "associatedProjects": [],
         "issueTypes": []
      },
      {
         "name":"Another configuration scheme",
         "id":"10106",
         "associatedProjects": [
            {
               "name": "PB",
               "id": "10001",
               "key": "PB"
            }
         ],
         "issueTypes": []
      }
   ]
}



Remove configuration scheme for custom field

Available since 1.7.3

Method type - DELETE

URL:

  • {JIRA_URL}/rest/extender/1.0/customField/removeConfigScheme/{configSchemeId}

where {configSchemeId} is custom field configuration scheme

Response format - JSON


Example URL:

  • {JIRA_URL}/rest/extender/1.0/customField/removeConfigScheme/10102

Example response JSON body

{
    "message": "config scheme '10102' deleted"
}


Get values for custom field configuration scheme

Method type - GET

URL:

  • {JIRA_URL}/rest/extender/1.0/customField/configScheme/getValue/{configSchemeId}

where {configSchemeId} is custom field configuration scheme

Response format - JSON


Example URL:

  • {JIRA_URL}/rest/extender/1.0/customField/configScheme/getValue/10104

Example response JSON body

Flags “disabled” (true/false) for options available since 1.1.0 plugin version

  • Example for standard fields (Radio buttons, Select list (sings/multiple choices), Checkboxes
 Click here to expand...
{
   "schemeOptions":[
      {
         "id":"10006",
         "name":"Select List (multiple choices) Value 1",
         "disabled":"false"
      },
      {
         "id":"10007",
         "name":"Select List (multiple choices) Value 2",
         "disabled":"true"
      }
   ]
}
  • Example for cascading field (Select list (cascading))
 Click here to expand...
{  
   "schemeOptions":[  
      {  
         "id":"10008",
         "name":"Select List (cascading) Parent Value 1",
         "disabled":"false"
         "childOptions":[  
            {  
               "parent_id":"10008",
               "name":"Select List (cascading) Children Parent 1 Value 1",
               "id":"10010",
               "disabled":"false"
            },
            {  
               "parent_id":"10008",
               "name":"Select List (cascading) Children Parent 1 Value 2",
               "id":"10011",
               "disabled":"false"
            },
            {  
               "parent_id":"10008",
               "name":"Select List (cascading) Children Parent 1 Value 3",
               "id":"10012",
               "disabled":"false"
            }
         ]
      },
      {  
         "id":"10009",
         "name":"Select List (cascading) Parent Value 2",
         "disabled":"true",
         "childOptions":[  
            {  
               "parent_id":"10009",
               "name":"Select List (cascading) Children Parent 2 Value 1",
               "id":"10013",
               "disabled":"false"
            },
            {  
               "parent_id":"10009",
               "name":"Select List (cascading) Children Parent 2 Value 2",
               "id":"10014",
               "disabled":"false"
            }
         ]
      }
   ]
}


Add values into custom field configuration scheme

Method type - POST

URL:

  • {JIRA_URL}/rest/extender/1.0/customField/configScheme/addValue/{configSchemeId}

where {configSchemeId} is custom field configuration scheme

Request format - JSON

Example

JSON example for one value (Single List fileds)
{
    "optionName":["New option"]
}
JSON example for several values (Single List fileds)
{
    "optionName":["New option 1", "New Option 2"]
}
JSON example for one value (Cascading fields)
{
    "parentOptionId":"10105",
    "optionName":["New option 1"]
}
JSON example for several values (Cascading fields)
{
    "parentOptionId":"10105",
    "optionName":["New option 1", "New Option 2"]
}

Response format - JSON

Example

{
  "message": "done - values [New value 1, New value 2] added to 10104 config scheme id"
}
{
    "message": "scheme config don't exist"
}


Remove values from custom field configuration scheme

Method type - POST

URL:

{JIRA_URL}/rest/extender/1.0/customField/configScheme/removeValue

Request format - JSON

Example

JSON example for one value
{
    "optionId":[10013]
}
JSON example for several values
{
    "optionId":[10013, 10014]
}

Response format - JSON

Example

{
    "message": "all options deleted",
    "skipped": [],
    "deleted": [
        "10013",
        "10014"
    ]
}
{
    "message": "options deleted, some options skipped",
    "skipped": [
        "1001300000"
    ],
    "deleted": []
}


Add custom fields

Available since 1.6.0

Method type - PUT

URL:

{JIRA_URL}/rest/extender/1.0/customField/addCustomField

Request format - JSON

Example

JSON example (all parameters)
{
	"fieldName":"FIELD NAME",
	"fieldDescription":"FIELD DESCRIPTION",
	"fieldTypeKey":"FIELD TYPE KEY",
	"schemeName":"FIELD CONFIG SCHEME NAME",
	"schemeDescription":"FIELD CONFIG SCHEME DESCRIPTION",
	"issueTypes":["ISSUE_TYPE_NAME", "ISSUE_TYPE_ID"],
	"projects":["PROJECT_NAME", "PROJECT_ID"]
}
  • fieldName - required
  • fieldDescriptionrequired
  • fieldTypeKeyrequired - uniq field type key; you can get all keys from REST API - Get custom fields types 
  • schemeName - optional - custom field configuration scheme name - default value ("Default Configuration Scheme for {CUSTOM_FIELD_NAME}")
  • schemeDescription - optional - custom field configuration scheme description - default value ("Default configuration scheme generated by Extender for JIRA")
  • issueTypes - optional - issue types for field context - default value ("Global (all issues)")
  • projects - optional - project for field context - default value (all projects)

Response format - JSON

Example

{
    "customFieldId": "customfield_10008",
    "configSchemeId": "10109",
    "message": "custom field 'Field3' created"
}


Delete custom fields

Available since 1.5.0

NOTE: Deleting several custom fields at once can take a long time or slow down the application

Method type - DELETE

URL:

{JIRA_URL}/rest/extender/1.0/customField/deleteCustomField

Request format - JSON

Example

You can use a custom field name or id. 
The plugin will not remove the field by name if there are two fields with the same name in your JIRA. In this case, please use custom field id.
JSON example for one custom field
{
    "customField":["FELD_NAME"]
}
JSON example for several custom fields
{
	"customField":["FELD_NAME", "FIELD_ID"];
}

Response format - JSON

{
    "message": "custom fields deleted",
    "skipped": [],
    "deleted": ["Field Number Two (customfield_10004)"]
}
{
    "message": "custom fields deleted, some custome fields skipped",
    "skipped": ["10001"],
    "deleted": ["Field Number One"]
}



Add custom fields schemes

Available since 1.6.0

Method type - PUT

URL:

{JIRA_URL}/rest/extender/1.0/customField/addConfigScheme/{customFieldId}

where {customFieldId} is custom field id

Request format - JSON

Example

JSON example (all parameters)
{
	"schemeName":"FIELD CONFIG SCHEME NAME",
	"schemeDescription":"FIELD CONFIG SCHEME DESCRIPTION",
	"issueTypes":["ISSUE_TYPE_NAME", "ISSUE_TYPE_ID"],
	"projects":["PROJECT_NAME", "PROJECT_ID"]
}
  • schemeName - optional - custom field configuration scheme name - default value ("Default Configuration Scheme for {CUSTOM_FIELD_NAME}")
  • schemeDescription - optional - custom field configuration scheme description - default value ("Default configuration scheme generated by Extender for JIRA")
  • issueTypes - optional - issue types for field context - default value ("Global (all issues)")
  • projects - optional - project for field context - default value (all projects)

Response format - JSON

Example

{
    "message": "config scheme id '10100' created for field '{CUTOME_FIELD_NAME}'",
    "configSchemeId": "10100"
}


Update custom fields schemes

Available since 1.6.0

Method type - PUT

URL:

{JIRA_URL}/rest/extender/1.0/customField/updateConfigScheme/{configSchemeId}

where {configSchemeId} is config scheme id

Request format - JSON

Example

JSON example (all parameters)
{
	"schemeName":"FIELD CONFIG SCHEME NAME",
	"schemeDescription":"FIELD CONFIG SCHEME DESCRIPTION",
	"projects":["PROJECT_NAME", "PROJECT_ID"]
}
  • schemeName - optional - custom field configuration scheme name - default value ("Default Configuration Scheme for {CUSTOM_FIELD_NAME}")
  • schemeDescription - optional - custom field configuration scheme description - default value ("Default configuration scheme generated by Extender for JIRA")
  • projects - optional - project for field context - default value (all projects)

Response format - JSON

Example

{
    "message": "config scheme id '10100' was changed"
}


Get custom fields types

Available since 1.6.0

Method type - GET

URL:

{JIRA_URL}/rest/extender/1.0/customField/customFieldTypes

Response format - JSON

Example

{
    "customFieldTypes": [
        {
            "name": "Checkboxes",
            "description": "Choose multiple values using checkboxes.",
            "key": "com.atlassian.jira.plugin.system.customfieldtypes:multicheckboxes"
        },
        {
            "name": "Date Picker",
            "description": "A custom field that stores dates and uses a date picker to view them",
            "key": "com.atlassian.jira.plugin.system.customfieldtypes:datepicker"
        }
    ]
}