This small how-to is all about setting custom fields on creating an issue. Apart from the customfield_xxxxx elements, only the minimum required fields are set.
POST https://myjiradomain.com/rest/api/2/issue
{
"fields": {
"project": {
"key": "REST"
},
"summary": "Issue created from REST API",
"issuetype": {
"id": "1"
},
"customfield_10100": {
"value": "First"
}
}
}
{
"fields": {
"project": {
"key": "REST"
},
"summary": "Issue created from REST API",
"issuetype": {
"id": "1"
},
"customfield_10200": [
{
"value": "Apple"
},
{
"value": "Banana"
}
]
}
}
{
"fields": {
"project": {
"key": "REST"
},
"summary": "Issue created from REST API",
"issuetype": {
"id": "1"
},
"customfield_10300": {
"value": "Mammal",
"child": {
"value": "Elephant"
}
}
}
}
{
"fields": {
"project": {
"key": "REST"
},
"summary": "Issue created from REST API",
"issuetype": {
"id": "1"
},
"customfield_10300": {
"value": "Mammal",
"child": null
}
}
}
Tested with Jira Software Server 8.13.3.
Thomas Deiler
Senior Agile Coach
none
none
228 accepted answers
7 comments