update_issue
Modify existing issues in Backlog by updating details like summary, priority, due dates, status, assignee, and custom fields to track project progress.
Instructions
Updates an existing issue
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| issueId | No | The numeric ID of the issue (e.g., 12345) | |
| issueKey | No | The key of the issue (e.g., 'PROJ-123') | |
| summary | No | Summary of the issue | |
| issueTypeId | No | Issue type ID | |
| priorityId | No | Priority ID | |
| description | No | Updates an existing issue | |
| startDate | No | Scheduled start date (yyyy-MM-dd) | |
| dueDate | No | Scheduled due date (yyyy-MM-dd) | |
| estimatedHours | No | Estimated work hours | |
| actualHours | No | Actual work hours | |
| categoryId | No | Category IDs | |
| versionId | No | Version IDs | |
| milestoneId | No | Milestone IDs | |
| statusId | No | Status ID | |
| resolutionId | No | Resolution ID | |
| assigneeId | No | User ID of the assignee | |
| notifiedUserId | No | User IDs to notify | |
| attachmentId | No | Attachment IDs | |
| comment | No | Comment to add when updating the issue | |
| customFields | No | List of custom fields to set on the issue |
Implementation Reference
- src/tools/updateIssue.ts:156-168 (handler)The async handler function that resolves the issue ID or key using resolveIdOrKey, processes custom fields with customFieldsToPayload, builds the payload, and updates the issue via backlog.patchIssue.handler: async ({ issueId, issueKey, customFields, ...params }) => { const result = resolveIdOrKey('issue', { id: issueId, key: issueKey }, t); if (!result.ok) { throw result.error; } const customFieldPayload = customFieldsToPayload(customFields); const finalPayload = { ...params, ...customFieldPayload, }; return backlog.patchIssue(result.value, finalPayload); },
- src/tools/updateIssue.ts:9-139 (schema)Zod schema for input validation of the update_issue tool, defining optional parameters such as issueId, issueKey, summary, description, dates, assignee, custom fields, etc.const updateIssueSchema = buildToolSchema((t) => ({ issueId: z .number() .optional() .describe( t( 'TOOL_UPDATE_ISSUE_ISSUE_ID', 'The numeric ID of the issue (e.g., 12345)' ) ), issueKey: z .string() .optional() .describe( t( 'TOOL_UPDATE_ISSUE_ISSUE_KEY', "The key of the issue (e.g., 'PROJ-123')" ) ), summary: z .string() .optional() .describe(t('TOOL_UPDATE_ISSUE_SUMMARY', 'Summary of the issue')), issueTypeId: z .number() .optional() .describe(t('TOOL_UPDATE_ISSUE_ISSUE_TYPE_ID', 'Issue type ID')), priorityId: z .number() .optional() .describe(t('TOOL_UPDATE_ISSUE_PRIORITY_ID', 'Priority ID')), description: z .string() .optional() .describe( t('TOOL_UPDATE_ISSUE_DESCRIPTION', 'Detailed description of the issue') ), startDate: z .string() .optional() .describe( t('TOOL_UPDATE_ISSUE_START_DATE', 'Scheduled start date (yyyy-MM-dd)') ), dueDate: z .string() .optional() .describe( t('TOOL_UPDATE_ISSUE_DUE_DATE', 'Scheduled due date (yyyy-MM-dd)') ), estimatedHours: z .number() .optional() .describe(t('TOOL_UPDATE_ISSUE_ESTIMATED_HOURS', 'Estimated work hours')), actualHours: z .number() .optional() .describe(t('TOOL_UPDATE_ISSUE_ACTUAL_HOURS', 'Actual work hours')), categoryId: z .array(z.number()) .optional() .describe(t('TOOL_UPDATE_ISSUE_CATEGORY_ID', 'Category IDs')), versionId: z .array(z.number()) .optional() .describe(t('TOOL_UPDATE_ISSUE_VERSION_ID', 'Version IDs')), milestoneId: z .array(z.number()) .optional() .describe(t('TOOL_UPDATE_ISSUE_MILESTONE_ID', 'Milestone IDs')), statusId: z .number() .optional() .describe(t('TOOL_UPDATE_ISSUE_STATUS_ID', 'Status ID')), resolutionId: z .number() .optional() .describe(t('TOOL_UPDATE_ISSUE_RESOLUTION_ID', 'Resolution ID')), assigneeId: z .number() .optional() .describe(t('TOOL_UPDATE_ISSUE_ASSIGNEE_ID', 'User ID of the assignee')), notifiedUserId: z .array(z.number()) .optional() .describe(t('TOOL_UPDATE_ISSUE_NOTIFIED_USER_ID', 'User IDs to notify')), attachmentId: z .array(z.number()) .optional() .describe(t('TOOL_UPDATE_ISSUE_ATTACHMENT_ID', 'Attachment IDs')), comment: z .string() .optional() .describe( t('TOOL_UPDATE_ISSUE_COMMENT', 'Comment to add when updating the issue') ), customFields: z .array( z.object({ id: z .number() .describe( t( 'TOOL_UPDATE_ISSUE_CUSTOM_FIELD_ID', 'The ID of the custom field (e.g., 12345)' ) ), value: z .union([z.number(), z.array(z.number())]) .optional() .describe( 'The ID(s) of the custom field item. For single-select fields, provide a number. For multi-select fields, provide an array of numbers representing the selected item IDs.' ), otherValue: z .string() .optional() .describe( t( 'TOOL_UPDATE_ISSUE_CUSTOM_FIELD_OTHER_VALUE', 'Other value for list type fields' ) ), }) ) .optional() .describe( t( 'TOOL_UPDATE_ISSUE_CUSTOM_FIELDS', 'List of custom fields to set on the issue' ) ), }));
- src/tools/tools.ts:89-117 (registration)The 'issue' toolset group where updateIssueTool is registered by including it in the tools array at line 97: updateIssueTool(backlog, helper). This toolset is later registered to the MCP server via registerTools.name: 'issue', description: 'Tools for managing issues and their comments.', enabled: false, tools: [ getIssueTool(backlog, helper), getIssuesTool(backlog, helper), countIssuesTool(backlog, helper), addIssueTool(backlog, helper), updateIssueTool(backlog, helper), deleteIssueTool(backlog, helper), getIssueCommentsTool(backlog, helper), addIssueCommentTool(backlog, helper), getPrioritiesTool(backlog, helper), getCategoriesTool(backlog, helper), getCustomFieldsTool(backlog, helper), getIssueTypesTool(backlog, helper), getResolutionsTool(backlog, helper), getWatchingListItemsTool(backlog, helper), getWatchingListCountTool(backlog, helper), addWatchingTool(backlog, helper), updateWatchingTool(backlog, helper), deleteWatchingTool(backlog, helper), markWatchingAsReadTool(backlog, helper), getVersionMilestoneListTool(backlog, helper), addVersionMilestoneTool(backlog, helper), updateVersionMilestoneTool(backlog, helper), deleteVersionTool(backlog, helper), ], },