Custom Reference Fields
GET /v3/trackers/{trackerId}/fields/1002
{
"id": 1002,
"name": "System",
"description": "System which caused the Defect",
"type": "TrackerItemChoiceField",
"hidden": false,
"valueModel": "ChoiceFieldValue<TrackerItemReference>",
"mandatoryInStatuses": [],
"multipleValues": false,
"referenceType": "TrackerItemReference"
},
This field needs ChoiceFieldValue<TrackerItemReference> valueModel so we will need to put a TrackerItemReference into ChoiceFieldValue:
{
"fieldId": 1002,
"name": "System",
"type": "ChoiceFieldValue",
"values": [ <TrackerItemReferences> ]
},
To get the available options choice fields we can call the GET /v3/items/{itemId}/fields/{fieldId}/options endpoint.
GET /v3/items/{itemId}/fields/1002/options
{
"page": 1,
"pageSize": 25,
"total": 2,
"references": [
{
"id": 2750873,
"name": "Rocket Science",
"type": "TrackerItemReference"
},
{
"id": 2750874,
"name": "Warp System",
"type": "TrackerItemReference"
}
]
}
The customFields item:
"customFields": [
{
"fieldId": 1002,
"name": "System",
"values": [
{
"id": 2750873,
"name": "Rocket Science",
"type": "TrackerItemReference"
},
],
"type": "ChoiceFieldValue"
}
]
Was this helpful?