transition_issue
Change Jira issue status by executing workflow transitions with optional comments to track progress updates.
Instructions
Change the status of a Jira issue by transitioning it
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| issueKey | Yes | The issue key to transition (e.g., PROJ-123) | |
| transitionId | Yes | The transition ID to execute (get from get_transitions) | |
| comment | No | Optional comment to add with the transition |
Implementation Reference
- The core handler function that executes the tool logic: destructures arguments, validates inputs, constructs transition payload (with optional comment), calls Jira API to perform the transition, and returns success/error response.async handleTransitionIssue(args: any) { try { const { issueKey, transitionId, comment } = args; if (!issueKey || !transitionId) { throw new Error('issueKey and transitionId are required'); } const transitionData: any = { transition: { id: transitionId, }, }; // Add comment if provided if (comment) { transitionData.update = { comment: [ { add: { body: comment, }, }, ], }; } await this.apiClient.post(`/issue/${issueKey}/transitions`, transitionData); return { content: [ { type: 'text', text: `✅ Issue ${issueKey} transitioned successfully!`, }, ], }; } catch (error: any) { return { content: [ { type: 'text', text: JiraFormatters.formatError(error), }, ], isError: true, }; } }
- src/tools/definitions.ts:237-258 (schema)Tool definition including name, description, and input schema (JSON Schema) for validating tool arguments.{ name: 'transition_issue', description: 'Change the status of a Jira issue by transitioning it', inputSchema: { type: 'object', properties: { issueKey: { type: 'string', description: 'The issue key to transition (e.g., PROJ-123)', }, transitionId: { type: 'string', description: 'The transition ID to execute (get from get_transitions)', }, comment: { type: 'string', description: 'Optional comment to add with the transition', }, }, required: ['issueKey', 'transitionId'], }, },
- src/index.ts:130-131 (registration)Registers the tool handler in the MCP server's switch statement for routing tool calls to the appropriate handler method.case 'transition_issue': return this.transitionHandlers.handleTransitionIssue(request.params.arguments);