Suppose there is a custom JIRA Issue Field defined in the connect app.
"jiraIssueFields": [
{
"description": {
"value": "My Field"
},
"type": "single_select",
"name": {
"value": "My Field"
},
"key": "my-issue-field"
}
]
I have added several options to this field like this:
{
"id": 1,
"value": "My option 1",
"config": {
"scope": {
"projects": [10001]
}
}
Then I decide to remove the project from this option and PUT the option with empty projects array:
const accountFieldUrl = '/rest/api/3/field/my-addon-key__my-issue-field/option'
const option = {
"id": 1,
"value": "My option 1",
"config": {
"scope": {
"projects": []
}
}
AP.request({
url: myFieldUrl + '/' + option.id,
type: 'PUT',
data: JSON.stringify(option),
dataType: 'json',
contentType: 'application/json',
success: function () {
...
},
error: function (msg) {
...
}
})
This returns no error, but after refresh, the project is still there "projects": [10001]
.
What could be the problem?
Thank you for any hint.
Ales