Skip to content

fix: convert descriptions to ADF format for Jira API v3 - #119

Open
jmservera wants to merge 1 commit into
github:claude/update-jira-api-endpointsfrom
jmservera:claude/update-jira-api-endpoints
Open

fix: convert descriptions to ADF format for Jira API v3#119
jmservera wants to merge 1 commit into
github:claude/update-jira-api-endpointsfrom
jmservera:claude/update-jira-api-endpoints

Conversation

@jmservera

Copy link
Copy Markdown

Jira REST API v3 requires the description field to be in Atlassian Document Format (ADF) rather than plain text. This caused HTTP 400 errors when creating issues.

Changes:

  • Add text_to_adf() to convert plain text to ADF JSON structure
  • Add adf_to_text() to parse ADF back to plain text (with backwards compatibility for plain strings and PropertyHolder objects)
  • Add format_description() on JiraProject that applies ADF conversion only when api_version is '3'
  • Fix parse_alert_info() to handle ADF input by converting to text first
  • Fix failed tuple to return 5 elements (matching the return signature)

Jira REST API v3 requires the description field to be in Atlassian
Document Format (ADF) rather than plain text. This caused HTTP 400
errors when creating issues.

Changes:
- Add text_to_adf() to convert plain text to ADF JSON structure
- Add adf_to_text() to parse ADF back to plain text (with backwards
  compatibility for plain strings and PropertyHolder objects)
- Add format_description() on JiraProject that applies ADF conversion
  only when api_version is '3'
- Fix parse_alert_info() to handle ADF input by converting to text first
- Fix failed tuple to return 5 elements (matching the return signature)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings June 19, 2026 17:34

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the Jira integration to be compatible with Jira REST API v3, which requires description to be sent/received in Atlassian Document Format (ADF) rather than plain strings (avoiding HTTP 400s during issue creation and ensuring parsing continues to work).

Changes:

  • Added text_to_adf() to convert plain-text descriptions into an ADF “doc” structure.
  • Added adf_to_text() and updated parse_alert_info() to reliably parse metadata from either ADF or plain-string descriptions.
  • Introduced JiraProject.format_description() to apply ADF conversion only when api_version == "3", and fixed parse_alert_info()’s failure tuple to match its 5-element return signature.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@jmservera

Copy link
Copy Markdown
Author

@zkoppert could you take a look? I managed to make it work with the new v3 with this change, I'm currently using my fork and works like a charm:

image

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.

2 participants