This resource represents custom issue field select list options created by a Connect app. See Issue custom field options to manipulate options created in Jira or using the REST API.
A select list issue field is a type of issue field that enables a user to select an option from a list. Use it to add, remove, and update the options of a select list issue field.
Returns a paginated list of all the options of a select list issue field. A select list issue field is a type of issue field that enables a user to select a value from a list of options.
Note that this operation only works for issue field select list options added by Connect apps, it cannot be used with issue field select list options created in Jira or using operations from the Issue custom field options resource.
Permissions required: Administer Jira global permission. Jira permissions are not required for the app providing the field.
manage:jira-configuration
read:field.option:jira
Connect app scope required: NONE
string
Requiredinteger
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/{fieldKey}/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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
{
"isLast": false,
"maxResults": 1,
"nextPage": "https://your-domain.atlassian.net/rest/api/3/field/fieldKey/option?startAt=1&maxResults=1",
"self": "https://your-domain.atlassian.net/rest/api/3/field/fieldKey/option?startAt=0&maxResults=1",
"startAt": 0,
"total": 10,
"values": [
{
"id": 1,
"value": "Team 1",
"properties": {
"leader": {
"name": "Leader Name",
"email": "lname@example.com"
},
"members": 42,
"description": "The team's description",
"founded": "2016-06-06"
},
"config": {
"scope": {
"projects": [],
"projects2": [
{
"id": 1001,
"attributes": [
"notSelectable"
]
},
{
"id": 1002,
"attributes": [
"notSelectable"
]
}
],
"global": {}
},
"attributes": []
}
}
]
}
Creates an option for a select list issue field.
Note that this operation only works for issue field select list options added by Connect apps, it cannot be used with issue field select list options created in Jira or using operations from the Issue custom field options resource.
Each field can have a maximum of 10000 options, and each option can have a maximum of 10000 scopes.
Permissions required: Administer Jira global permission. Jira permissions are not required for the app providing the field.
manage:jira-configuration
write:field.option:jira
Connect app scope required: NONE
string
RequiredIssueFieldOptionConfiguration
object
string
Requiredany
Returned if the request is successful.
Details of the options for a select list issue field.
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
// This sample uses Atlassian Forge
// https://developer.atlassian.com/platform/forge/
import api, { route } from "@forge/api";
var bodyData = `{
"config": {
"attributes": [],
"scope": {
"global": {},
"projects": [],
"projects2": [
{
"attributes": [
"notSelectable"
],
"id": 1001
},
{
"attributes": [
"notSelectable"
],
"id": 1002
}
]
}
},
"properties": {
"description": "The team's description",
"founded": "2016-06-06",
"leader": {
"email": "lname@example.com",
"name": "Leader Name"
},
"members": 42
},
"value": "Team 1"
}`;
const response = await api.asUser().requestJira(route`/rest/api/3/field/{fieldKey}/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
21
22
23
24
25
26
27
28
29
30
31
32
33
34
{
"id": 1,
"value": "Team 1",
"properties": {
"leader": {
"name": "Leader Name",
"email": "lname@example.com"
},
"members": 42,
"description": "The team's description",
"founded": "2016-06-06"
},
"config": {
"scope": {
"projects": [],
"projects2": [
{
"id": 1001,
"attributes": [
"notSelectable"
]
},
{
"id": 1002,
"attributes": [
"notSelectable"
]
}
],
"global": {}
},
"attributes": []
}
}
Returns a paginated list of options for a select list issue field that can be viewed and selected by the user.
Note that this operation only works for issue field select list options added by Connect apps, it cannot be used with issue field select list options created in Jira or using operations from the Issue custom field options resource.
Permissions required: Permission to access Jira.
read:jira-work
read:field.option:jira
Connect app scope required: NONE
string
Requiredinteger
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/{fieldKey}/option/suggestions/edit`, {
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
{
"isLast": false,
"maxResults": 1,
"nextPage": "https://your-domain.atlassian.net/rest/api/3/field/fieldKey/option/suggestions?startAt=1&maxResults=1",
"self": "https://your-domain.atlassian.net/rest/api/3/field/fieldKey/option/suggestions?startAt=0&maxResults=1",
"startAt": 0,
"total": 10,
"values": [
{
"id": 1,
"value": "Team 1",
"properties": {
"leader": {
"name": "Leader Name",
"email": "lname@example.com"
},
"members": 42,
"description": "The team's description",
"founded": "2016-06-06"
}
}
]
}
Returns a paginated list of options for a select list issue field that can be viewed by the user.
Note that this operation only works for issue field select list options added by Connect apps, it cannot be used with issue field select list options created in Jira or using operations from the Issue custom field options resource.
Permissions required: Permission to access Jira.
read:jira-work
read:field.option:jira
Connect app scope required: NONE
string
Requiredinteger
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/{fieldKey}/option/suggestions/search`, {
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
{
"isLast": false,
"maxResults": 1,
"nextPage": "https://your-domain.atlassian.net/rest/api/3/field/fieldKey/option/suggestions?startAt=1&maxResults=1",
"self": "https://your-domain.atlassian.net/rest/api/3/field/fieldKey/option/suggestions?startAt=0&maxResults=1",
"startAt": 0,
"total": 10,
"values": [
{
"id": 1,
"value": "Team 1",
"properties": {
"leader": {
"name": "Leader Name",
"email": "lname@example.com"
},
"members": 42,
"description": "The team's description",
"founded": "2016-06-06"
}
}
]
}
Returns an option from a select list issue field.
Note that this operation only works for issue field select list options added by Connect apps, it cannot be used with issue field select list options created in Jira or using operations from the Issue custom field options resource.
Permissions required: Administer Jira global permission. Jira permissions are not required for the app providing the field.
manage:jira-configuration
read:field.option:jira
Connect app scope required: NONE
string
Requiredinteger
RequiredReturned if the requested option is returned.
Details of the options for a select list issue 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/field/{fieldKey}/option/{optionId}`, {
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
27
28
29
30
31
32
33
34
{
"id": 1,
"value": "Team 1",
"properties": {
"leader": {
"name": "Leader Name",
"email": "lname@example.com"
},
"members": 42,
"description": "The team's description",
"founded": "2016-06-06"
},
"config": {
"scope": {
"projects": [],
"projects2": [
{
"id": 1001,
"attributes": [
"notSelectable"
]
},
{
"id": 1002,
"attributes": [
"notSelectable"
]
}
],
"global": {}
},
"attributes": []
}
}
Updates or creates an option for a select list issue field. This operation requires that the option ID is provided when creating an option, therefore, the option ID needs to be specified as a path and body parameter. The option ID provided in the path and body must be identical.
Note that this operation only works for issue field select list options added by Connect apps, it cannot be used with issue field select list options created in Jira or using operations from the Issue custom field options resource.
Permissions required: Administer Jira global permission. Jira permissions are not required for the app providing the field.
manage:jira-configuration
write:field.option:jira
Connect app scope required: NONE
string
Requiredinteger
RequiredIssueFieldOptionConfiguration
integer
Requiredobject
string
RequiredReturned if the option is updated or created.
Details of the options for a select list issue field.
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
// This sample uses Atlassian Forge
// https://developer.atlassian.com/platform/forge/
import api, { route } from "@forge/api";
var bodyData = `{
"config": {
"attributes": [],
"scope": {
"global": {},
"projects": [],
"projects2": [
{
"attributes": [
"notSelectable"
],
"id": 1001
},
{
"attributes": [
"notSelectable"
],
"id": 1002
}
]
}
},
"id": 1,
"properties": {
"description": "The team's description",
"founded": "2016-06-06",
"leader": {
"email": "lname@example.com",
"name": "Leader Name"
},
"members": 42
},
"value": "Team 1"
}`;
const response = await api.asUser().requestJira(route`/rest/api/3/field/{fieldKey}/option/{optionId}`, {
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
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
{
"id": 1,
"value": "Team 1",
"properties": {
"leader": {
"name": "Leader Name",
"email": "lname@example.com"
},
"members": 42,
"description": "The team's description",
"founded": "2016-06-06"
},
"config": {
"scope": {
"projects": [],
"projects2": [
{
"id": 1001,
"attributes": [
"notSelectable"
]
},
{
"id": 1002,
"attributes": [
"notSelectable"
]
}
],
"global": {}
},
"attributes": []
}
}
Deletes an option from a select list issue field.
Note that this operation only works for issue field select list options added by Connect apps, it cannot be used with issue field select list options created in Jira or using operations from the Issue custom field options resource.
Permissions required: Administer Jira global permission. Jira permissions are not required for the app providing the field.
manage:jira-configuration
delete:field.option:jira
Connect app scope required: NONE
string
Requiredinteger
RequiredReturned if the field option is deleted.
any
1
2
3
4
5
6
7
8
9
10
11
12
13
// 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/{fieldKey}/option/{optionId}`, {
method: 'DELETE',
headers: {
'Accept': 'application/json'
}
});
console.log(`Response: ${response.status} ${response.statusText}`);
console.log(await response.json());
Deselects an issue-field select-list option from all issues where it is selected. A different option can be selected to replace the deselected option. The update can also be limited to a smaller set of issues by using a JQL query.
Connect and Forge app users with Administer Jira global permission can override the screen security configuration using overrideScreenSecurity
and overrideEditableFlag
.
This is an asynchronous operation. The response object contains a link to the long-running task.
Note that this operation only works for issue field select list options added by Connect apps, it cannot be used with issue field select list options created in Jira or using operations from the Issue custom field options resource.
Permissions required: Administer Jira global permission. Jira permissions are not required for the app providing the field.
manage:jira-configuration
write:field.option:jira
, delete:field.option:jira
Connect app scope required: NONE
string
Requiredinteger
Requiredinteger
string
boolean
boolean
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/{fieldKey}/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: