QMetry: Bulk Update Test Run UDFs
qmetry_bulk_update_test_run_udfsBulk update custom field values for multiple test case runs in a single async operation. Specify test run IDs and field values to update text, numbers, dates, single/multi-select, or cascading fields.
Instructions
Bulk update User Defined Field (UDF) values for one or more Test Case Runs in a test execution. Runs asynchronously in the background.
Toolset: UDF
Parameters:
projectKey (string): Project key - unique identifier for the project (default: "default")
baseUrl (string): The base URL for the QMetry instance (must be a valid URL)
tcRunIDs (array) required: Array of Test Case Run IDs to update UDF values for. To get tcRunIDs — Call 'Fetch Test Case Runs by Test Suite Run' tool. From the response, get value of data[].tcRunID. Example: [41572006, 41572009, 41572013]
UDF (record<string, object>) required: Object mapping UDF field names to their new values. Each key is the UDF field name (e.g. 'test_env', 'priority_field'). Each value is an object with fieldID and value (and optionally multiSelectAction for multi-select fields). All UDF fields are optional — include only the fields you want to update.
Output Description: JSON object with success status, code 'CO.BULK_TC_EXECUTION_UDF_UPDATE_STARTED', and message confirming the background job was queued.
Use Cases: 1. Bulk update a string UDF (e.g. build version, environment name) for multiple test runs 2. Set a date UDF field (e.g. execution date) across multiple test case runs 3. Update a numeric UDF field (e.g. story points, priority score) in bulk 4. Set a single-select lookup UDF to a new value for multiple runs 5. Append new values to a multi-select UDF field across multiple test runs 6. Replace all existing selections in a multi-select UDF with new values 7. Update a cascading list UDF (parent + child) for multiple test runs 8. Update multiple UDF fields of different types in a single bulk operation 9. Reset a UDF field value for all runs in a test suite execution 10. Sync automated test result metadata (environment, build, platform) into UDF fields after execution
Examples:
Bulk update a STRING UDF for multiple test runs
{
"tcRunIDs": [
41572006,
41572009,
41572013
],
"UDF": {
"8190_String": {
"fieldID": 229241,
"value": "regression-v2.1"
}
}
}Expected Output: Bulk updates to execution UDF values will run in the background. Go to 'Scheduled Task' to track the process.
Bulk update a DATE UDF field for multiple test runs (MM-DD-YYYY format)
{
"tcRunIDs": [
41572006,
41572009
],
"UDF": {
"KN_DATE": {
"fieldID": 229255,
"value": "06-20-2026"
}
}
}Expected Output: Bulk updates to execution UDF values will run in the background.
Bulk update a NUMBER UDF field for multiple test runs
{
"tcRunIDs": [
41572006,
41572009,
41572013,
41572015
],
"UDF": {
"defaultNum": {
"fieldID": 229003,
"value": 5
}
}
}Expected Output: Bulk updates to execution UDF values will run in the background.
Bulk update a single-select LOOKUPLIST UDF for multiple test runs
{
"tcRunIDs": [
41572006,
41572009
],
"UDF": {
"8260LUP": {
"fieldID": 228563,
"value": 5108697
}
}
}Expected Output: Bulk updates to execution UDF values will run in the background.
Bulk update a MULTILOOKUPLIST UDF — APPEND new values to existing selections
{
"tcRunIDs": [
41572006,
41572009,
41572013
],
"UDF": {
"m_selections": {
"fieldID": 229223,
"value": [
5158524,
5158525
],
"multiSelectAction": "append"
}
}
}Expected Output: Bulk updates to execution UDF values will run in the background.
Bulk update a MULTILOOKUPLIST UDF — REPLACE existing selections with new values
{
"tcRunIDs": [
41572006,
41572009
],
"UDF": {
"mullt_env": {
"fieldID": 229425,
"value": [
5108697,
5108698
],
"multiSelectAction": "replace"
}
}
}Expected Output: Bulk updates to execution UDF values will run in the background.
Bulk update a CASCADINGLIST UDF (parent + child) for multiple test runs
{
"tcRunIDs": [
41572006,
41572009,
41572013
],
"UDF": {
"cascade_mcp": {
"fieldID": 229426,
"value": {
"parent": 5126498,
"child": 5126499
}
}
}
}Expected Output: Bulk updates to execution UDF values will run in the background.
Bulk update multiple UDF fields of different types in a single operation
{
"tcRunIDs": [
41572006,
41572009,
41572013,
41572015,
41579875
],
"UDF": {
"8190_String": {
"fieldID": 229241,
"value": "smoke-test"
},
"KN_DATE": {
"fieldID": 229255,
"value": "06-20-2026"
},
"defaultNum": {
"fieldID": 229003,
"value": 3
},
"8260LUP": {
"fieldID": 228563,
"value": 5108697
},
"m_selections": {
"fieldID": 229223,
"value": [
5158524,
5158525
],
"multiSelectAction": "append"
},
"mullt_env": {
"fieldID": 229425,
"value": [
5108697,
5108698
],
"multiSelectAction": "replace"
},
"cascade_mcp": {
"fieldID": 229426,
"value": {
"parent": 5126498,
"child": 5126499
}
}
}
}Expected Output: Bulk updates to execution UDF values will run in the background. Go to 'Scheduled Task' to track the process.
Hints: 1. REQUIRED: 'tcRunIDs' must be a non-empty array of numeric Test Case Run IDs. Get IDs from 'Fetch Test Case Runs by Test Suite Run' tool → data[].tcRunID. 2. REQUIRED: 'UDF' must be an object with at least one field entry. Each key is the UDF field name; each value has 'fieldID' and 'value'. 3. VALUE FORMATS by field type: STRING: plain string, e.g. 'regression-build' NUMBER: number, e.g. 3 DATETIMEPICKER: date string in MM-DD-YYYY format, e.g. '06-20-2026' LOOKUPLIST (single select): numeric item ID, e.g. 5108697 MULTILOOKUPLIST (multi-select): array of item IDs, e.g. [5158524, 5158525] CASCADINGLIST: object with parent and child keys, e.g. {parent: 5126498, child: 5126499}. To get valid child IDs for a CASCADINGLIST field — first call 'Fetch Test Run UDF Metadata' to get the parent item IDs from lookupOptions, then call 'Fetch Cascade Child Values' with a parent item ID to get the available child IDs, then use {parent: , child: } as the value here. 4. MULTILOOKUPLIST — multiSelectAction rules: 'append' (default): new values are ADDED to existing selections. Use when user says 'add', 'include', 'append'. 'replace': existing selections are CLEARED and replaced with only the new values. Use when user says 'replace', 'set to', 'overwrite', 'change to'. If user does not specify, ALWAYS default to 'append'. Never assume 'replace'. 5. MULTILOOKUPLIST — apply multiSelectAction per field individually. Different multi-select fields in the same request can have different multiSelectAction values. 6. DATE FORMAT: Always use MM-DD-YYYY format for DATETIMEPICKER fields (e.g. '06-20-2026', not '2026-06-20'). Convert from any user-supplied date format before calling the tool. 7. ASYNC OPERATION: This API runs in the background. The success response means the job was queued, not that it completed. Tell the user to check 'Scheduled Task' in QMetry UI to track completion. 8. CRITICAL — FIELD IDs: The 'fieldID' for each UDF entry MUST be the exact numeric ID from QMetry's UDF definition — do NOT guess, infer, or fabricate fieldIDs. If the user has not provided a fieldID, ask the user to supply it or look it up in QMetry admin settings before calling this tool. Using a wrong fieldID will silently fail or update the wrong field. 9. CRITICAL — WORKFLOW: When user asks to bulk-update a UDF across all executions of a test suite run (e.g. tsRunID 731600), ALWAYS call 'Fetch Test Case Runs by Test Suite Run' first with that tsRunID to collect ALL tcRunIDs from the response (data[].tcRunID), THEN call this tool. Never skip the fetch step or hard-code tcRunIDs. 10. ALL UDF FIELDS ARE OPTIONAL: Only include the UDF fields the user wants to update. Do not include fields with no change. 11. tcRunIDs vs entityIDs: This tool uses 'tcRunIDs' (array of numbers). Do NOT confuse with 'Bulk Update Test Case Execution Status' which uses 'entityIDs' (comma-separated string).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| UDF | Yes | Object mapping UDF field names to their new values. Each key is the UDF field name (e.g. 'test_env', 'priority_field'). Each value is an object with fieldID and value (and optionally multiSelectAction for multi-select fields). All UDF fields are optional — include only the fields you want to update. | |
| baseUrl | No | The base URL for the QMetry instance (must be a valid URL) | |
| tcRunIDs | Yes | Array of Test Case Run IDs to update UDF values for. To get tcRunIDs — Call 'Fetch Test Case Runs by Test Suite Run' tool. From the response, get value of data[<index>].tcRunID. Example: [41572006, 41572009, 41572013] | |
| projectKey | No | Project key - unique identifier for the project | default |