Skip to content

Conversation

@clx-jlmoreno
Copy link

Description

Resolves the Jira search API deprecation issue by migrating to the new /search/jql endpoints for Cloud only.

Fixes #658 - Addresses the deprecation of /rest/api/2|3/search endpoints (effective August 1st, 2025).

Solution Implementation

Following the official Adaptavist migration guide, this PR implements Cloud-only migration:

Cloud vs Server/DC Differentiation

  • Cloud: Uses new POST /rest/api/3/search/jql endpoint
  • Server/DC: Continues using existing /rest/api/*/search endpoints
  • Detection: Based on config.is_cloud setting

API Migration (Cloud Only)

  • Old: GET/POST /rest/api/2|3/search
  • New: POST /rest/api/3/search/jql
  • Payload: Changed from query params to JSON body

Pagination Update (Cloud Only)

  • Cloud: nextPageToken with isLast flag
  • Server/DC: Continues using startAt parameter

Response Format Handling (Cloud Only)

  • Default: Issue IDs only (["PROJ-123", "PROJ-124"])
  • With fields: Full issue objects (backward compatible)
  • Auto-detection: Handles both formats seamlessly

Server/DC Compatibility Maintained

  • No breaking changes for Server/DC installations
  • Identical behavior as before for on-premise deployments
  • MCP contract preserved across all deployment types

Files Changed

  • src/mcp_atlassian/jira/search.py - Cloud/Server differentiation logic
  • src/mcp_atlassian/models/jira/search.py - Response parsing for both formats
  • src/mcp_atlassian/models/jira/issue.py - ADF description handling
  • tests/unit/jira/test_search.py - Updated for both Cloud/Server scenarios

Testing

Live Environment Tested

  • Jira Cloud: crealogixme.atlassian.net
  • Project: ARQBE
  • Epic: ARQBE-11
  • Issue: ARQBE-525

Unit Test Coverage

  • 383 Jira tests pass
  • 24 search-specific tests pass
  • Both Cloud and Server/DC paths tested

Impact

  • Zero breaking changes for existing users
  • Server/DC: Continues working exactly as before
  • Cloud: Future-proof until August 1st, 2025 deadline
  • Performance: Improved pagination for Cloud
  • Compatibility: Works with both Cloud and Server/DC

@clx-jlmoreno clx-jlmoreno mentioned this pull request Nov 5, 2025
2 tasks
- Implement Cloud vs Server/DC differentiation in search.py
- Cloud: Use new /rest/api/3/search/jql with nextPageToken pagination
- Server/DC: Continue using existing /rest/api/*/search endpoints
- Handle new Cloud response format (issue IDs vs full objects)
- Add ADF description handling in models
- Maintain 100% MCP contract compatibility
- Apply code formatting and linting fixes
- Fixes compatibility with Atlassian API deprecation (Aug 1, 2025)

Fixes sooperset#658
@clx-jlmoreno clx-jlmoreno force-pushed the fix/jira-search-api-deprecation-658 branch from 12f85d7 to f3a73f1 Compare November 5, 2025 18:25
@clx-jlmoreno
Copy link
Author

Update: Squashed commits into a single clean commit for easier review.

Changes consolidated:

  • Main Jira Cloud API migration fix
  • Code formatting and linting compliance fixes
  • Single commit with comprehensive message

The PR is now ready for review with a clean git history! 🚀

@eciuca
Copy link

eciuca commented Nov 10, 2025

We need someone to review and merge this, please!

@michaelper22
Copy link

Would be very excited to see either this or #731 merged 🙏

@ChadNedzlek
Copy link

Same. The MCP is completely broken for me without this...

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.

[Bug]: jira_search fails

4 participants