This resource represents the fields associated to project and issue type contexts. Use it to:
Associates fields with projects.
Fields will be associated with each issue type on the requested projects.
Fields will be associated with all projects that share the same field configuration which the provided projects are using. This means that while the field will be associated with the requested projects, it will also be associated with any other projects that share the same field configuration.
If a success response is returned it means that the field association has been created in any applicable contexts where it wasn't already present.
Up to 50 fields and up to 100 projects can be associated in a single request. If more fields or projects are provided a 400 response will be returned.
Permissions required: Administer Jira global permission.
manage:jira-configuration
write:field-configuration:jira
Connect app scope required: ADMIN
Payload containing the fields to associate and the projects to associate them to.
array<AssociationContextObject>
Requiredarray<FieldIdentifierObject>
RequiredReturned if the field association validation passes.
any
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
// This sample uses Atlassian Forge
// https://developer.atlassian.com/platform/forge/
import api, { route } from "@forge/api";
var bodyData = `{
"associationContexts": [
{
"identifier": 10000,
"type": "PROJECT_ID"
},
{
"identifier": 10001,
"type": "PROJECT_ID"
}
],
"fields": [
{
"identifier": "customfield_10000",
"type": "FIELD_ID"
},
{
"identifier": "customfield_10001",
"type": "FIELD_ID"
}
]
}`;
const response = await api.asUser().requestJira(route`/rest/api/3/field/association`, {
method: 'PUT',
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json'
},
body: bodyData
});
console.log(`Response: ${response.status} ${response.statusText}`);
console.log(await response.json());
Unassociates a set of fields with a project and issue type context.
Fields will be unassociated with all projects/issue types that share the same field configuration which the provided project and issue types are using. This means that while the field will be unassociated with the provided project and issue types, it will also be unassociated with any other projects and issue types that share the same field configuration.
If a success response is returned it means that the field association has been removed in any applicable contexts where it was present.
Up to 50 fields and up to 100 projects and issue types can be unassociated in a single request. If more fields or projects are provided a 400 response will be returned.
Permissions required: Administer Jira global permission.
manage:jira-configuration
write:field-configuration:jira
Connect app scope required: ADMIN
Payload containing the fields to uassociate and the projects and issue types to unassociate them to.
array<AssociationContextObject>
Requiredarray<FieldIdentifierObject>
RequiredReturned if the field association validation passes.
any
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
// This sample uses Atlassian Forge
// https://developer.atlassian.com/platform/forge/
import api, { route } from "@forge/api";
var bodyData = `{
"associationContexts": [
{
"identifier": 10000,
"type": "PROJECT_ID"
},
{
"identifier": 10001,
"type": "PROJECT_ID"
}
],
"fields": [
{
"identifier": "customfield_10000",
"type": "FIELD_ID"
},
{
"identifier": "customfield_10001",
"type": "FIELD_ID"
}
]
}`;
const response = await api.asUser().requestJira(route`/rest/api/3/field/association`, {
method: 'DELETE',
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json'
},
body: bodyData
});
console.log(`Response: ${response.status} ${response.statusText}`);
console.log(await response.json());
Rate this page: