I'm trying to create formatted Jira comments using the Atlassian CLI (acli) with Atlassian Document Format (ADF), but I'm having trouble getting the formatting to render correctly.
What Works:
The acli jira workitem comment update command correctly supports --body-adf for updating comments with ADF formatting:
acli jira workitem comment update --key "TICKET-123" --id 12345 --body-adf /path/to/comment.adf.json
This renders bold, italic, lists, and other formatting perfectly in Jira.
Note: The --body-adf flag is documented here: https://developer.atlassian.com/cloud/acli/reference/commands/jira-workitem-comment-update/#options but doesn't appear in the --help output for the command.
What Doesn't Work:
I cannot figure out how to CREATE a new comment with ADF formatting. I've tried:
1. Using --body with ADF JSON:
acli jira workitem comment create -k "TICKET-123" --body '{"version":1,"type":"doc","content":[...]}'
Result: The raw JSON is posted as plain text
2. Using --body-file with an ADF JSON file:
acli jira workitem comment create -k "TICKET-123" --body-file comment.adf.json
Result: Comment is created but formatting doesn't render (shows as plain text)
3. The comment create command doesn't have a --body-adf flag (at least not in the help menu)
My Question:
How can I create a NEW comment with ADF formatting using acli? Is there a --body-adf flag for comment create that's not documented in the help menu? Or is there a different approach I should be using?
The ADF structure I'm using matches what Jira stores when I manually format comments in the UI (verified via the Jira REST API), so I believe the ADF format itself is correct.
Any guidance would be appreciated!
Thanks!