Hello,
We develop an app that we would like to be able to update the “Goals” field on - ideally with part of the value from the GET (e.g. the first two attempts below).
However I’ve been unable to do so.
The PUT 3/issue/{issuekey}
API returns 200 or 204 depending on the value of parameter returnIssue
However the value of the customfield Goals is never not ‘null’.
Below are various bodies of the PUT request to 3/issue/{issuekey}
The field value with the object from GET 3/issue/{issuekey}
{ "fields": { "customfield_13548": [{"id":"ari:cloud:townsquare:3e2690ed-7cf6-42ce-9470-6f43d513350d:goal/e4aac47a-ce50-41cd-86e1-4b2ccd04f645"}]} }
The id value from GET 3/issue/{issuekey}
{ "fields": { "customfield_13548": ["ari:cloud:townsquare:3e2690ed-7cf6-42ce-9470-6f43d513350d:goal/e4aac47a-ce50-41cd-86e1-4b2ccd04f645"]} }
The key of the goal according to https://team.atlassian.com/goals
{ "fields": { "customfield_13548": ["ZFTYCVVS-9"]} }
{ "update": { "customfield_13548": [{"set": ["ari:cloud:townsquare:3e2690ed-7cf6-42ce-9470-6f43d513350d:goal/e4aac47a-ce50-41cd-86e1-4b2ccd04f645"]}] } }
{ "update": { "customfield_13548": [{"set": [{"id":"ari:cloud:townsquare:3e2690ed-7cf6-42ce-9470-6f43d513350d:goal/e4aac47a-ce50-41cd-86e1-4b2ccd04f645"}]}] } }
I do note in the editmeta (see below) there are no allowed values.
When the field is set via the UI
/3/issue/{issuekey}
returns
"customfield_13548": [
{
"id": "ari:cloud:townsquare:3e2690ed-7cf6-42ce-9470-6f43d513350d:goal/d197cdf0-c347-4f88-a8c9-1226f62199b4"
}
],
/3/field
{
"id": "customfield_13548",
"key": "customfield_13548",
"name": "Goals",
"untranslatedName": "Goals",
"custom": true,
"orderable": true,
"navigable": true,
"searchable": true,
"clauseNames": [
"cf[13548]",
"Goals",
"Goals[Goals]"
],
"schema": {
"type": "array",
"items": "Goals",
"custom": "com.atlassian.jira.plugin.system.customfieldtypes:goals",
"customId": 13548
}
},
/3/issue/{issuekey}/editmeta
{
"required": false,
"schema": {
"type": "array",
"items": "Goals",
"custom": "com.atlassian.jira.plugin.system.customfieldtypes:goals",
"customId": 13548
},
"name": "Goals",
"key": "customfield_13548",
"operations": [
"set"
],
"allowedValues": []
}
(edited formating)