fix: improve custom field handling in JIRA create/update operations with enhanced error diagnostics #690
+1,331
−877
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Note
If you would like to test / use this version, you can pull it from
ghcr.io/mliq/mcp-atlassian:latest.Since the owner of this repo has been MIA for 3 months, I'm open to moving development to my fork at https://github.com/mliq/mcp-atlassian.
Description
This PR improves custom field handling in JIRA create/update operations with enhanced error diagnostics, building upon @4erdenko's custom field parsing fixes from PR #629 and addressing multiple open issues including improved error propagation (#649) and informative error messages (#486).
Custom fields in JIRA operations were failing due to validation errors when
additional_fieldswas passed as JSON strings from XML-to-JSON converters. This work extends the parsing fix toupdate_issueoperations and adds comprehensive error handling to help diagnose custom field formatting issues.Fixes: #649
Fixes: #486
Related to: #629 (builds upon this work)
Related to: #630 (improved diagnostics for field formatting issues)
Changes
jira_create_issuetojira_update_issueoperations (building on @4erdenko's work in feat: parse JSON additional_fields (#1) #629)Testing
Checklist
Technical Implementation
Problem Solved
External clients (e.g., Anthropic Claude, Cursor) emit tool calls in XML format that get converted to JSON-RPC. During this conversion,
additional_fields(used for JIRA custom fields) gets wrapped in quotes as a JSON string instead of remaining as a native object, causing Pydantic validation failures.Core Features
additional_fieldsJSON string parsing from create to update operationsFiles Modified
src/mcp_atlassian/servers/jira.py- Core functionality enhancements (351 lines added)tests/unit/servers/test_jira_server.py- Test coverage for custom field handling (109 lines added)uv.lock- Dependency updates from development environmentCredits
This work builds upon the custom field parsing foundation initially implemented by @4erdenko in PR #629.
Co-authored-by: 4erdenko [email protected]