Custom Fields
For tracker specific fields there aren't any explicit fields provided as the Swagger definition requires a fixed model structure. These field values are presented in the customFields attribute like in the following Test Case example:
{
"name": "Test Case 2",
"customFields": [
{
"fieldId": 10003,
"name": "Reusable",
"value": false,
"type": "BoolFieldValue"
},
{
"fieldId": 1001,
"name": "User custom choice",
"values": [
{
"id": 2,
"name": "Second option",
"type": "ChoiceOptionReference"
}
],
"type": "ChoiceFieldValue"
},
{
"fieldId": 1000000,
"name": "Test Steps",
"values": [
[
{
"fieldId": 1000001,
"name": "Action",
"value": "Enter an invalid username and an invalid password.Click login button",
"type": "WikiTextFieldValue"
},
{
"fieldId": 1000002,
"name": "Expected result",
"value": "The application should display an error message and re-open the login page.",
"type": "WikiTextFieldValue"
},
{
"fieldId": 1000003,
"name": "Critical",
"value": false,
"type": "BoolFieldValue"
}
]
],
"type": "TableFieldValue"
}
]
}
In order to find out the
fieldId-s and model types to use here we need to discover the field configuration of the tracker described in the
Discovering the project structure section.
To find the fieldId-s we need to call the GET /v3/trackers/{trackerId}/fields endpoint:
Response:
[
...
{
"id": 1001,
"name": "User custom choice",
"type": "FieldReference",
"trackerId": 4309
},
...
{
"id": 10003,
"name": "Reusable",
"type": "FieldReference",
"trackerId": 4309
},
...
{
"id": 1000000,
"name": "Test Steps",
"type": "FieldReference",
"trackerId": 4309
}
]