feat: support ADF task lists (checkboxes) in Markdown conversion - #73
Open
PascalTemel wants to merge 1 commit into
Open
feat: support ADF task lists (checkboxes) in Markdown conversion#73PascalTemel wants to merge 1 commit into
PascalTemel wants to merge 1 commit into
Conversation
Markdown -> ADF: "- [ ]" / "- [x]" items now produce real taskList/
taskItem nodes (state TODO/DONE, generated localId), so descriptions and
comments get clickable Jira action items instead of literal bracket text.
ADF -> Markdown: taskList/taskItem previously hit the library translator
as unknown nodes and were flattened to concatenated text ("Test 1Test 2").
They now render as "- [ ] ..." / "- [x] ..." bullet lines, which also
round-trips: an edited description preserves checked state via the
[x] marker.
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
Adds GFM task-list support to both directions of the Markdown⇄ADF conversion.
Markdown → ADF (
internal/api/markdown.go):- [ ]/- [x]items parse into realtaskList/taskItemnodes withstate: TODO/DONEand generatedlocalIds (UUIDv4-shaped, as required by Jira). Previously these fell through tobulletListand rendered as literal[ ]text — no clickable checkboxes. The task-list branch is checked before the bullet-list branch (the prefixes overlap), and each parser breaks cleanly at the other's items so adjacent lists don't swallow each other.ADF → Markdown (
internal/api/jira.go):taskList/taskItemwere unknown to the jira-cli translator and got silently flattened to concatenated text — an issue containing action items rendered them asTest 1Test 2. They now convert to a bullet list with[ ]/[x]markers before hitting the translator. The marker is merged into the leading text node because the translator drops trailing spaces of standalone text nodes.Because both directions speak the same syntax, checked state now round-trips:
atl jira issue view→ edit →atl jira issue edit --descriptionpreserves[x]states (items get fresh localIds, which Jira accepts).Docs updated (README syntax table, AGENTS.md formatting section).
Testing
internal/api/markdown_tasklist_test.go: parse states/localIds/inline marks, mutual list-boundary tests, ADFToText rendering, full round-trip.make checkgreen: gofmt, vet, golangci-lint (0 issues), all package tests pass.- [ ]/- [x]via the patched binary to NX-16095 (comment 561381) — accepted by Jira's ADF validation and reads back with intact markers.