Making a Tracker Item Status Transition
Finding out the fieldId of status field using GET /v3/trackers/{trackerId}/fields
[
{
"id": 0,
"name": "ID",
"type": "FieldReference",
"trackerId": 4308
},
...
{
"id": 7,
"name": "Status",
"type": "FieldReference",
"trackerId": 4308
}
...
]
As next step let's get the field definition via GET /v3/trackers/{trackerId}/fields/7
{
"id": 7,
"name": "Status",
"type": "OptionChoiceField",
"hidden": false,
"valueModel": "ChoiceFieldValue<ChoiceOptionReference>",
"mandatoryInStatuses": [],
"multipleValues": false,
"options": [
{
"id": 0,
"name": "Unset",
"type": "ChoiceOptionReference"
},
{
"id": 1,
"name": "New",
"type": "ChoiceOptionReference"
},
{
"id": 2,
"name": "Suspended",
"type": "ChoiceOptionReference"
},
{
"id": 3,
"name": "In progress",
"type": "ChoiceOptionReference"
},
{
"id": 4,
"name": "Partly completed",
"type": "ChoiceOptionReference"
},
{
"id": 5,
"name": "Completed",
"type": "ChoiceOptionReference"
},
{
"id": 6,
"name": "To Verify",
"type": "ChoiceOptionReference"
},
{
"id": 7,
"name": "InQA",
"type": "ChoiceOptionReference"
}
],
"trackerItemField": "status",
"referenceType": "ChoiceOptionReference"
}
* 
The trackerItemField property which provides the connection between the explicit properties and the built-in fields. It means now that the Status field is represented as status in the TrackerItem model.
So we'll need to construct a ChoiceFieldValue<ChoiceOptionReference> as valueModel for the update, check Tracker item operations for details.
So the final request body:
{
"fieldValues": [
{
"fieldId": 7,
"name": "Status",
"values": [
{
"id": 3,
"name": "In progress",
"type": "ChoiceOptionReference"
}
],
"type": "ChoiceFieldValue"
}
]
}
It will update only the provided field values and keep every other field as they are.
Was this helpful?