Custom Table Fields
For Test Steps:
GET /v3/trackers/{trackerId}/fields/100000:
{
"id": 1000000,
"name": "Test Steps",
"type": "TableField",
"hidden": false,
"valueModel": "TableFieldValue",
"mandatoryInStatuses": [],
"columns": [
{
"id": 1000001,
"name": "Action",
"type": "WikiTextField",
"hidden": false,
"valueModel": "WikiTextFieldValue",
"mandatoryInStatuses": [ ... ]
},
{
"id": 1000002,
"name": "Expected result",
"type": "WikiTextField",
"hidden": false,
"valueModel": "WikiTextFieldValue",
"mandatoryInStatuses": []
},
{
"id": 1000003,
"name": "Critical",
"type": "BoolField",
"hidden": false,
"valueModel": "BoolFieldValue",
"mandatoryInStatuses": []
},
{
"id": 1000004,
"name": "Id",
"type": "WikiTextField",
"hidden": true,
"valueModel": "WikiTextFieldValue",
"mandatoryInStatuses": []
}
]
}
It needs a TableFieldValue:
The values here are a list of lists representing the rows and columns for the table field and the field definition also defines the columns:
"columns": [
{
"id": 1000001,
"name": "Action",
"type": "WikiTextField",
"hidden": false,
"valueModel": "WikiTextFieldValue",
"mandatoryInStatuses": [ ... ]
},
{
"id": 1000002,
"name": "Expected result",
"type": "WikiTextField",
"hidden": false,
"valueModel": "WikiTextFieldValue",
"mandatoryInStatuses": []
},
{
"id": 1000003,
"name": "Critical",
"type": "BoolField",
"hidden": false,
"valueModel": "BoolFieldValue",
"mandatoryInStatuses": []
},
{
"id": 1000004,
"name": "Id",
"type": "WikiTextField",
"hidden": true,
"valueModel": "WikiTextFieldValue",
"mandatoryInStatuses": []
}
]
The Id field is hidden so we need to construct a [WikiTextFieldValue, WikiTextFieldValue, BoolFieldValue] list for each row.
The final custom field value:
"customFields": [
{
"fieldId": 1000000,
"name": "Test Steps",
"values": [
[
{
"fieldId": 1000001,
"name": "Action",
"value": "Action 1",
"type": "WikiTextFieldValue"
},
{
"fieldId": 1000002,
"name": "Expected result",
"value": "Expected result 1",
"type": "WikiTextFieldValue"
},
{
"fieldId": 1000003,
"name": "Critical",
"value": false,
"type": "BoolFieldValue"
}
],
[
{
"fieldId": 1000001,
"name": "Action",
"value": "Action 2",
"type": "WikiTextFieldValue"
},
{
"fieldId": 1000002,
"name": "Expected result",
"value": "Expected result 2",
"type": "WikiTextFieldValue"
},
{
"fieldId": 1000003,
"name": "Critical",
"value": false,
"type": "BoolFieldValue"
}
]
],
"type": "TableFieldValue"
}
]
It will create two test steps:
Was this helpful?