jira_transition_issue
Change the status of a Jira issue by providing the issue key and target status to update workflow progress.
Instructions
Transition a Jira issue to a different status
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| issue_key | Yes | Issue key (e.g., PROJ-123) | |
| status | Yes | Target status (e.g., In Progress, Done) |
Implementation Reference
- src/jira_server.py:345-372 (handler)Implements the core logic for transitioning a Jira issue: retrieves available transitions, matches the target status, and executes the transition using the Jira client.async def _transition_issue(self, arguments: dict) -> List[TextContent]: """Transition an issue to a different status""" issue_key = arguments["issue_key"] target_status = arguments["status"] # Get available transitions transitions = self.jira_client.get_issue_transitions(issue_key) # Find the transition that matches the target status transition_id = None for transition in transitions["transitions"]: if transition["to"]["name"].lower() == target_status.lower(): transition_id = transition["id"] break if not transition_id: available_statuses = [t["to"]["name"] for t in transitions["transitions"]] return [TextContent( type="text", text=f"Cannot transition to '{target_status}'. Available statuses: {', '.join(available_statuses)}" )] self.jira_client.set_issue_status(issue_key, transition_id) return [TextContent( type="text", text=f"Transitioned issue {issue_key} to status: {target_status}" )]
- src/jira_server.py:163-180 (registration)Registers the 'jira_transition_issue' tool in the MCP server's list_tools() method, including name, description, and input schema.Tool( name="jira_transition_issue", description="Transition a Jira issue to a different status", inputSchema={ "type": "object", "properties": { "issue_key": { "type": "string", "description": "Issue key (e.g., PROJ-123)" }, "status": { "type": "string", "description": "Target status (e.g., In Progress, Done)" } }, "required": ["issue_key", "status"] } ),
- src/jira_server.py:166-180 (schema)Defines the input schema for the jira_transition_issue tool, specifying required parameters: issue_key and status.inputSchema={ "type": "object", "properties": { "issue_key": { "type": "string", "description": "Issue key (e.g., PROJ-123)" }, "status": { "type": "string", "description": "Target status (e.g., In Progress, Done)" } }, "required": ["issue_key", "status"] } ),
- src/jira_server.py:207-208 (registration)Dispatches calls to the jira_transition_issue tool to the _transition_issue handler in the call_tool method.elif name == "jira_transition_issue": return await self._transition_issue(arguments)