jira_transition_issue
Update a JIRA issue's status by specifying the issue key and transition ID, with an optional comment for tracking the change.
Instructions
Transition an issue to a new status
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| comment | No | Optional comment for the transition | |
| issueKey | Yes | The JIRA issue key | |
| transitionId | Yes | The transition ID |
Implementation Reference
- server.js:351-369 (handler)The handler function that executes the tool logic by calling the JiraClient's transitionIssue method.async ({ issueKey, transitionId, comment }) => { logger.info('Transitioning JIRA issue', { issueKey, transitionId }); try { await jiraClient.transitionIssue(issueKey, transitionId, comment); logger.info('Successfully transitioned issue', { issueKey, transitionId }); return { content: [{ type: 'text', text: `Issue ${issueKey} transitioned successfully` }] }; } catch (error) { logger.error('Failed to transition issue', { issueKey, transitionId, error: error.message }); throw error; } }
- server.js:345-349 (schema)Input schema definition using Zod for validating tool parameters.inputSchema: { issueKey: z.string().describe('The JIRA issue key'), transitionId: z.string().describe('The transition ID'), comment: z.string().optional().describe('Optional comment for the transition') }
- server.js:340-370 (registration)Registration of the jira_transition_issue tool with MCP server, including name, metadata, schema, and handler.server.registerTool( 'jira_transition_issue', { title: 'Transition JIRA Issue', description: 'Transition an issue to a new status', inputSchema: { issueKey: z.string().describe('The JIRA issue key'), transitionId: z.string().describe('The transition ID'), comment: z.string().optional().describe('Optional comment for the transition') } }, async ({ issueKey, transitionId, comment }) => { logger.info('Transitioning JIRA issue', { issueKey, transitionId }); try { await jiraClient.transitionIssue(issueKey, transitionId, comment); logger.info('Successfully transitioned issue', { issueKey, transitionId }); return { content: [{ type: 'text', text: `Issue ${issueKey} transitioned successfully` }] }; } catch (error) { logger.error('Failed to transition issue', { issueKey, transitionId, error: error.message }); throw error; } } );
- server.js:162-172 (helper)Core helper method in JiraClient that performs the actual JIRA API transition request.async transitionIssue(issueKey, transitionId, comment = null) { logger.info('Transitioning JIRA issue', { issueKey, transitionId, comment }); const body = { transition: { id: transitionId } }; if (comment) { body.update = { comment: [{ add: { body: comment } }] }; } return await this.makeRequest(`issue/${issueKey}/transitions`, { method: 'POST', body: JSON.stringify(body) }); }