Skip to content

Conversation

@dmikushin
Copy link

Summary

This PR adds comprehensive MCP API support for managing JIRA issue status transitions, eliminating the need to open the JIRA web interface for status changes.

Problem

Currently, users need to leave their development environment and open the JIRA web interface just to change an issue's status (e.g., from "To Do" to "In Progress" or marking as "Done"). This context switching is inefficient and disrupts workflow.

Solution

This PR introduces two new MCP tools that enable direct status management:

New Tools

  1. jira_get_issue_transitions - Retrieves all available workflow transitions for an issue

    • Shows which status changes are possible from current state
    • Lists required/optional fields for each transition
    • Provides transition IDs needed for status changes
  2. jira_transition_issue - Changes an issue's status

    • Supports workflow transitions with transition ID
    • Allows adding comments during transition
    • Handles required fields if workflow demands them
    • Supports bulk field updates during transition

Implementation Details

  • Added getTransitions() and transitionIssue() methods to the issues service
  • Created dedicated controller with proper error handling
  • Implemented user-friendly formatter for transition information
  • Full test coverage for all new functionality
  • TypeScript types for type safety

Usage Examples

# Get available transitions for an issue
jira_get_issue_transitions --issueIdOrKey "PROJECT-123"

# Change issue status with comment
jira_transition_issue --issueIdOrKey "PROJECT-123" --transitionId "21" --comment "Starting work on this"

# Transition with field updates
jira_transition_issue --issueIdOrKey "PROJECT-123" --transitionId "31" --fields '{"resolution": {"id": "10000"}}'

Testing

  • ✅ All existing tests pass
  • ✅ New tests added for transitions controller and formatter
  • ✅ TypeScript compilation successful
  • ✅ Manual testing completed with real JIRA instance

Benefits

  • Improved Developer Experience: No need to leave IDE/terminal to manage issue statuses
  • Automation Ready: Can be integrated into scripts and workflows
  • Consistent Interface: Uses same MCP patterns as other tools in the package
  • Comprehensive: Handles all aspects of JIRA workflow transitions

This enhancement significantly improves the developer workflow by keeping all JIRA interactions within the development environment.

- Add jira_get_issue_transitions tool to retrieve available workflow transitions
- Add jira_transition_issue tool to change issue status with optional comment
- Implement getTransitions() and transitionIssue() in issues service
- Create transitions controller with proper error handling
- Add formatter for user-friendly transition information display
- Include comprehensive test coverage for transitions functionality
- Support for required/optional fields during status transitions

This allows users to manage JIRA issue statuses directly through MCP without opening the web interface.
@dmikushin dmikushin force-pushed the feat/add-transitions-api branch from c2afe72 to a063996 Compare September 30, 2025 15:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant