I have installed following plugin to support multi-value type field in Azure DevOps https://marketplace.visualstudio.com/items?itemName=ms-devlabs.vsts-extensions-multivalue-control#:~:text=Azure%20Devops%20Services,used%20to%20back%20the%20extension.
I am able to set the option for this field by separating using "semicolon". like "A; B; C" I can also see this field in my work item and able to set the values.
I need help with how can I update this multivalue type field through REST API. I want to change the value of the work item which has this multi-value type field through REST API. I have already tried updating them using the following approaches
It sets up the value which I am sending using option 4, but it adds those as an extra option though the option already exists with that value. I can see extra spaces on the option which I am sending through REST AP{I, but I have checked my JSON there is no extra space (using option 4).
I add a new work item field Multivalue control Test
and configure Multivalue control
We could get the work item details via the REST API Work Items - Get Work Item:
GET https://dev.azure.com/{organization}/{project}/_apis/wit/workitems/{id}?api-version=6.0
And we could check the value of field Custom.MultivaluecontrolTest
Result:
Then we could update the value via the REST API Work Items - Update to update the value.
PATCH https://dev.azure.com/{organization}/{project}/_apis/wit/workitems/{id}?api-version=6.0
Sample request body:
[
{
"op": "test",
"path": "/rev",
"value": 7
},
{
"op": "add",
"path": "/fields/Custom.MultivaluecontrolTest",
"value": "A;B;C"
}
]
Result:
The filed value format is A;B;C
, same as UI