Skip to content

feat: support ADF task lists (checkboxes) in Markdown conversion - #73

Open
PascalTemel wants to merge 1 commit into
mainfrom
claude/adf-task-lists
Open

feat: support ADF task lists (checkboxes) in Markdown conversion#73
PascalTemel wants to merge 1 commit into
mainfrom
claude/adf-task-lists

Conversation

@PascalTemel

Copy link
Copy Markdown

Summary

Adds GFM task-list support to both directions of the Markdown⇄ADF conversion.

Markdown → ADF (internal/api/markdown.go): - [ ] / - [x] items parse into real taskList/taskItem nodes with state: TODO/DONE and generated localIds (UUIDv4-shaped, as required by Jira). Previously these fell through to bulletList and 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/taskItem were unknown to the jira-cli translator and got silently flattened to concatenated text — an issue containing action items rendered them as Test 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 --description preserves [x] states (items get fresh localIds, which Jira accepts).

Docs updated (README syntax table, AGENTS.md formatting section).

Testing

  • New internal/api/markdown_tasklist_test.go: parse states/localIds/inline marks, mutual list-boundary tests, ADFToText rendering, full round-trip.
  • make check green: gofmt, vet, golangci-lint (0 issues), all package tests pass.
  • Live verification against Jira: posted a comment with - [ ]/- [x] via the patched binary to NX-16095 (comment 561381) — accepted by Jira's ADF validation and reads back with intact markers.

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.
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.

1 participant