You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(testmanagement): apply custom templates via the v1 create endpoint
The public v2 create endpoint silently drops template_id, so a custom template
could never be applied through it. The v1 create endpoint DOES honour
template_id — verified end-to-end against prod.
When template_id is set, createTestCase now routes to
POST /api/v1/projects/{numericId}/test-cases (API-TOKEN auth, folder in the
body) instead of v2. custom_fields are translated from the MCP's by-name shape
to v1's by-id shape (field name -> id, option value -> option id) via form
fields, so multi-select custom fields keep working alongside a template. When
no template_id is given, the proven v2 path is unchanged (zero regression).
Verified live (project PR-141254, throwaway folder, cleaned up): a create with
template_id=656127 + custom_fields {aaas:[m40,m48]} + priority + tags + steps
produced template_id=656127 and both custom-field values, isError:false.
Tests: +2 (v1 routing shape/auth, custom_fields name->id translation). 198 green.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
text: `Warning: requested template_id ${params.template_id} was not applied — the test case uses template_id ${appliedId}. The public Test Management create API does not currently apply a chosen template; verify the id via listTestCaseTemplates and that it is linked to this project.`,
421
+
text: `Warning: requested template_id ${params.template_id} was not applied — the test case uses template_id ${appliedId}. Confirm the id via listTestCaseTemplates and that the template is linked to this project.`,
0 commit comments