Bulk Update Specific Fields on a Large Number of Tracker Items
PUT /v3/items/fields (from Codebeamer) can be used to change specific fields on a large number of tracker items without providing the whole Tracker Item models.
Example request body to add a user to the "Assigned to" field of two tracker items.
[
{
"itemId": 1000,
"fieldValues": [
{
"values": [
{
"id": 714,
"type": "UserReference"
}
],
"fieldId": 5,
"type": "ChoiceFieldValue"
}
]
},
{
"itemId": 1001,
"fieldValues": [
{
"values": [
{
"id": 714,
"type": "UserReference"
}
],
"fieldId": 5,
"type": "ChoiceFieldValue"
}
]
}
]
Atomic parameter
To run the bulk update in an atomic transaction (if one update fails all of the updates is getting rollbacked) please provide atomic=true as a request param like
http://server-name:8080/cb/api/v3/items/fields?atomic=true
The default value for atomic is false.
ResponseExample responses for the three possible outcomes.
Response when every update is successful:
{
"successfulOperationsCount": 2
}
The atomic transaction's response with failure (atomic=true):
{
"message": "At least one update failed",
"resourceUri": "items/fields",
"failedOperations": [
{
"id": 2147483647,
"exceptionMessage": "Tracker item is not found."
}
]
}
Non-Atomic transaction's response: success plus failure (atomic=false):
{
"successfulOperationsCount": 1,
"failedOperations": [
{
"id": 2147483647,
"exceptionMessage": "Tracker item is not found."
}
]
}