Repository navigation
fix(issue): convert Markdown descriptions to Jira wiki markup on upload - #97
Merged
Merged
Conversation
budjira talks to Jira over REST API v2, where the description field is rendered with the legacy wiki-markup renderer. Descriptions were uploaded verbatim, so Markdown that authors write (headings, checkboxes, bullet lists) rendered as garbage: `## X` became a numbered outline, `- [ ]` literal text. Add a contained Markdown->wiki converter (headings, bullet/ordered lists, task checkboxes, bold, inline code, links, fenced code) and apply it on the create and update description write paths in IssueService. DoR validation runs upstream on the raw Markdown, so its `## ` section markers still match. This is the pragmatic v2 workaround; the proper REST v3 + ADF migration is tracked separately as an epic. Closes #95
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
budjira talks to Jira over REST API v2, where the
descriptionfield is renderedwith the legacy wiki-markup renderer. Descriptions were uploaded verbatim, so
Markdown that authors naturally write rendered as garbage —
## Descriptionbecamea
1. → a.numbered outline and- [ ]rendered as literal[ ]text (issue #95).This PR adds a contained Markdown → Jira wiki-markup converter and applies it on
the description write paths. It is the pragmatic v2 workaround; the correct long-term
fix (REST v3 + ADF, which affects far more than descriptions) is tracked as epic #96.
Changes
budjira/utils/markdown_to_jira.py:markdown_to_wiki()— headings (#→h1.),bullet/ordered lists, task checkboxes (
- [ ]→* (x),- [x]→* (/)), bold,inline code, links, fenced code blocks (verbatim inside
{code})budjira/services/issues.py: convert description oncreate()andupdate()Why the service layer
DoR validation runs upstream in the CLI on the raw Markdown, so its
^##sectionmarkers still match. Conversion happens inside
IssueService, after DoR — so aDoR-compliant create both passes validation and renders correctly.
Scope
Descriptions only (create + update), matching issue #95. Comment/worklog/link bodies
have the same v2 wiki-markup behavior and are listed as part of the broader v3 work in
#96; the converter is generic and can be applied there later.
Verification
Closes #95
Part of #96