This resource represents custom issue field select list options created in Jira or using the REST API. This resource supports the following field types:
See Issue custom field options (apps) to manipulate custom issue field select list options created by a Connect app.
Use it to retrieve, create, update, order, and delete custom field options.
Returns a custom field option. For example, an option in a select list.
Note that this operation only works for issue field select list options created in Jira or using operations from the Issue custom field options resource, it cannot be used with issue field select list options created by Connect apps.
This operation can be accessed anonymously.
Permissions required: The custom field option is returned as follows:
read:jira-work
read:field:jira
, read:field.option:jira
Connect app scope required: READ
string
RequiredReturned if the request is successful.
Details of a custom option for a field.
1
2
3
4
5
6
7
8
9
10
11
12
// This sample uses Atlassian Forge
// https://developer.atlassian.com/platform/forge/
import api, { route } from "@forge/api";
const response = await api.asUser().requestJira(route`/rest/api/3/customFieldOption/{id}`, {
headers: {
'Accept': 'application/json'
}
});
console.log(`Response: ${response.status} ${response.statusText}`);
console.log(await response.json());
1
2
3
4
{
"self": "https://your-domain.atlassian.net/rest/api/3/customFieldOption/10000",
"value": "To Do"
}
Returns a paginated list of all custom field option for a context. Options are returned first then cascading options, in the order they display in Jira.
This operation works for custom field options created in Jira or the operations from this resource. To work with issue field select list options created for Connect apps use the Issue custom field options (apps) operations.
Permissions required: Administer Jira global permission.
manage:jira-configuration
read:field.option:jira
Connect app scope required: READ
string
Requiredinteger
Requiredinteger
boolean
integer
integer
Returned if the request is successful.
A page of items.
1
2
3
4
5
6
7
8
9
10
11
12
// This sample uses Atlassian Forge
// https://developer.atlassian.com/platform/forge/
import api, { route } from "@forge/api";
const response = await api.asUser().requestJira(route`/rest/api/3/field/{fieldId}/context/{contextId}/option`, {
headers: {
'Accept': 'application/json'
}
});
console.log(`Response: ${response.status} ${response.statusText}`);
console.log(await response.json());
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
{
"isLast": true,
"maxResults": 100,
"startAt": 0,
"total": 4,
"values": [
{
"id": "10001",
"value": "New York"
},
{
"id": "10002",
"value": "Boston",
"disabled": true
},
{
"id": "10004",
"value": "Denver"
},
{
"id": "10003",
"value": "Brooklyn",
"optionId": "10001"
}
]
}
Updates the options of a custom field.
If any of the options are not found, no options are updated. Options where the values in the request match the current values aren't updated and aren't reported in the response.
Note that this operation only works for issue field select list options created in Jira or using operations from the Issue custom field options resource, it cannot be used with issue field select list options created by Connect apps.
Permissions required: Administer Jira global permission.
manage:jira-configuration
read:field.option:jira
, write:field.option:jira
Connect app scope required: ADMIN
string
Requiredinteger
Requiredarray<CustomFieldOptionUpdate>
Returned if the request is successful.
A list of custom field options for a context.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
// This sample uses Atlassian Forge
// https://developer.atlassian.com/platform/forge/
import api, { route } from "@forge/api";
var bodyData = `{
"options": [
{
"disabled": false,
"id": "10001",
"value": "Scranton"
},
{
"disabled": true,
"id": "10002",
"value": "Manhattan"
},
{
"disabled": false,
"id": "10003",
"value": "The Electric City"
}
]
}`;
const response = await api.asUser().requestJira(route`/rest/api/3/field/{fieldId}/context/{contextId}/option`, {
method: 'PUT',
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json'
},
body: bodyData
});
console.log(`Response: ${response.status} ${response.statusText}`);
console.log(await response.json());
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
{
"options": [
{
"disabled": false,
"id": "10001",
"value": "Scranton"
},
{
"disabled": true,
"id": "10002",
"value": "Manhattan"
},
{
"disabled": false,
"id": "10003",
"value": "The Electric City"
}
]
}
Creates options and, where the custom select field is of the type Select List (cascading), cascading options for a custom select field. The options are added to a context of the field.
The maximum number of options that can be created per request is 1000 and each field can have a maximum of 10000 options.
This operation works for custom field options created in Jira or the operations from this resource. To work with issue field select list options created for Connect apps use the Issue custom field options (apps) operations.
Permissions required: Administer Jira global permission.
manage:jira-configuration
read:field.option:jira
, write:field.option:jira
Connect app scope required: ADMIN
string
Requiredinteger
Requiredarray<CustomFieldOptionCreate>
Returned if the request is successful.
A list of custom field options for a context.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
// This sample uses Atlassian Forge
// https://developer.atlassian.com/platform/forge/
import api, { route } from "@forge/api";
var bodyData = `{
"options": [
{
"disabled": false,
"value": "Scranton"
},
{
"disabled": true,
"optionId": "10000",
"value": "Manhattan"
},
{
"disabled": false,
"value": "The Electric City"
}
]
}`;
const response = await api.asUser().requestJira(route`/rest/api/3/field/{fieldId}/context/{contextId}/option`, {
method: 'POST',
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json'
},
body: bodyData
});
console.log(`Response: ${response.status} ${response.statusText}`);
console.log(await response.json());
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
{
"options": [
{
"disabled": false,
"id": "10001",
"value": "Scranton"
},
{
"disabled": true,
"id": "10002",
"optionId": "10000",
"value": "Manhattan"
},
{
"disabled": false,
"id": "10003",
"value": "The Electric City"
}
]
}
Changes the order of custom field options or cascading options in a context.
This operation works for custom field options created in Jira or the operations from this resource. To work with issue field select list options created for Connect apps use the Issue custom field options (apps) operations.
Permissions required: Administer Jira global permission.
manage:jira-configuration
write:field.option:jira
Connect app scope required: ADMIN
string
Requiredinteger
Requiredstring
array<string>
Requiredstring
Returned if options are reordered.
any
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// This sample uses Atlassian Forge
// https://developer.atlassian.com/platform/forge/
import api, { route } from "@forge/api";
var bodyData = `{
"customFieldOptionIds": [
"10001",
"10002"
],
"position": "First"
}`;
const response = await api.asUser().requestJira(route`/rest/api/3/field/{fieldId}/context/{contextId}/option/move`, {
method: 'PUT',
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json'
},
body: bodyData
});
console.log(`Response: ${response.status} ${response.statusText}`);
console.log(await response.json());
Deletes a custom field option.
Options with cascading options cannot be deleted without deleting the cascading options first.
This operation works for custom field options created in Jira or the operations from this resource. To work with issue field select list options created for Connect apps use the Issue custom field options (apps) operations.
Permissions required: Administer Jira global permission.
manage:jira-configuration
delete:field.option:jira
Connect app scope required: ADMIN
string
Requiredinteger
Requiredinteger
RequiredReturned if the option is deleted.
1
2
3
4
5
6
7
8
9
10
// This sample uses Atlassian Forge
// https://developer.atlassian.com/platform/forge/
import api, { route } from "@forge/api";
const response = await api.asUser().requestJira(route`/rest/api/3/field/{fieldId}/context/{contextId}/option/{optionId}`, {
method: 'DELETE'
});
console.log(`Response: ${response.status} ${response.statusText}`);
console.log(await response.text());
Replaces the options of a custom field.
Note that this operation only works for issue field select list options created in Jira or using operations from the Issue custom field options resource, it cannot be used with issue field select list options created by Connect or Forge apps.
Permissions required: Administer Jira global permission.
manage:jira-configuration
read:field.option:jira
, write:field.option:jira
Connect app scope required: ADMIN
string
Requiredinteger
Requiredinteger
Requiredinteger
string
Returned if the long-running task to deselect the option is started.
Details about a task.
1
2
3
4
5
6
7
8
9
10
// This sample uses Atlassian Forge
// https://developer.atlassian.com/platform/forge/
import api, { route } from "@forge/api";
const response = await api.asUser().requestJira(route`/rest/api/3/field/{fieldId}/context/{contextId}/option/{optionId}/issue`, {
method: 'DELETE'
});
console.log(`Response: ${response.status} ${response.statusText}`);
console.log(await response.text());
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
{
"self": "https://your-domain.atlassian.net/rest/api/3/task/1",
"id": "1",
"description": "Remove option 1 from issues matched by '*', and replace with option 3",
"status": "COMPLETE",
"result": {
"errors": {
"errorMessages": [
"Option 2 cannot be set on issue MKY-5 as it is not in the correct scope"
],
"errors": {},
"httpStatusCode": {
"empty": false,
"present": true
}
},
"modifiedIssues": [
10001,
10010
],
"unmodifiedIssues": [
10005
]
},
"elapsedRuntime": 42
}
Rate this page: