update_version_milestone
Modify version milestones in Backlog projects to track progress, adjust timelines, or update details like names, dates, and archive status.
Instructions
Updates an existing version milestone
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| projectId | No | The numeric ID of the project (e.g., 12345) | |
| projectKey | No | The key of the project (e.g., 'PROJECT') | |
| id | Yes | Version ID | |
| name | Yes | Version name | |
| description | No | Updates an existing version milestone | |
| startDate | No | Start date | |
| releaseDueDate | No | Release due date | |
| archived | No | Archive status of the version |
Implementation Reference
- The core tool definition including the inline handler function that resolves the project ID or key and calls `backlog.patchVersions` to update the version milestone.export const updateVersionMilestoneTool = ( backlog: Backlog, { t }: TranslationHelper ): ToolDefinition< ReturnType<typeof updateVersionMilestoneSchema>, (typeof VersionSchema)['shape'] > => { return { name: 'update_version_milestone', description: t( 'TOOL_UPDATE_VERSION_MILESTONE_DESCRIPTION', 'Updates an existing version milestone' ), schema: z.object(updateVersionMilestoneSchema(t)), outputSchema: VersionSchema, importantFields: [ 'id', 'name', 'description', 'startDate', 'releaseDueDate', 'archived', ], handler: async ({ projectId, projectKey, id, ...params }) => { const result = resolveIdOrKey( 'project', { id: projectId, key: projectKey }, t ); if (!result.ok) { throw result.error; } return backlog.patchVersions(result.value, id, params); }, }; };
- Zod schema definition for the input parameters of the update_version_milestone tool, including project ID/key, version ID, name, description, dates, and archived status.const updateVersionMilestoneSchema = buildToolSchema((t) => ({ projectId: z .number() .optional() .describe( t( 'TOOL_UPDATE_VERSION_MILESTONE_PROJECT_ID', 'The numeric ID of the project (e.g., 12345)' ) ), projectKey: z .string() .optional() .describe( t( 'TOOL_UPDATE_VERSION_MILESTONE_PROJECT_KEY', "The key of the project (e.g., 'PROJECT')" ) ), id: z.number().describe(t('TOOL_UPDATE_VERSION_MILESTONE_ID', 'Version ID')), name: z .string() .describe(t('TOOL_UPDATE_VERSION_MILESTONE_NAME', 'Version name')), description: z .string() .optional() .describe( t('TOOL_UPDATE_VERSION_MILESTONE_DESCRIPTION', 'Version description') ), startDate: z .string() .optional() .describe(t('TOOL_UPDATE_VERSION_MILESTONE_START_DATE', 'Start date')), releaseDueDate: z .string() .optional() .describe( t('TOOL_UPDATE_VERSION_MILESTONE_RELEASE_DUE_DATE', 'Release due date') ), archived: z .boolean() .optional() .describe( t( 'TOOL_UPDATE_VERSION_MILESTONE_ARCHIVED', 'Archive status of the version' ) ), }));
- src/tools/tools.ts:55-55 (registration)Import of the updateVersionMilestoneTool.import { updateVersionMilestoneTool } from './updateVersionMilestone.js';
- src/tools/tools.ts:114-114 (registration)Registration of the tool in the 'issue' toolset group within allTools function.updateVersionMilestoneTool(backlog, helper),