Skip to content
developers
Open TestCollab

Unlink a defect from an executed test case

PUT/defects/{id}/unlink

Requires the project’s existing manageDefect permission. Removes the selected defect record’s test case, test plan, execution, plan test case, revision, and step associations. The defect remains in the project’s defects list, and the underlying external or inbuilt issue is preserved. Other defect records and their associations, execution results, and existing history are unchanged. Records the actor, defect, test case, and test plan in a project activity. The executedtestcase must match the selected defect record’s current link. Requests for an already unlinked defect fail without adding another activity.

Use resource IDs from your own project. Keep the API token in your server or CI environment.

example.ts
import { createConfiguration, DefectsApi } from '@testcollab/sdk';
const config = createConfiguration(process.env.TESTCOLLAB_TOKEN!);
const api = new DefectsApi(config);
const result = await api.unlinkDefect({
"unlinkDefectPayload": {
"project": 123,
"executedtestcase": 123
},
"id": 123
});
console.log(result);
Name Location Type Required Description
id path integer Yes ID of the TestCollab defect record, not the external issue ID
Field Type Required Description
project integer Yes Project containing the defect
executedtestcase integer Yes Execution currently linked to the selected defect record. Use the record’s executedtestcase value, including when viewing a defect from an earlier run.

200 — Defect unlinked and project activity recorded

Illustrative response
{}
Status Meaning
400 Missing or invalid project, defect, or executed test case ID
401 Authentication required
403 Project access or manageDefect permission denied
404 Defect not found in the requested project
409 Defect is not linked to the specified executed test case