Table cells contain text nodes directly instead of wrapping in paragraph — Jira rejects with INVALID_INPUT - #9
Conversation
Complexity AssessmentClassification: SIMPLE Metrics:
Reasoning: This is a localized change to wrap table cell content in paragraph nodes. The fix requires modifying only 2 conversion methods in ASTBuilder.ts with ~20-40 LOC total. The expected behavior is clearly documented in the ADF fixture file (table-document.adf), and the change is isolated to table cell handling with no impact on other system components. |
Combined Analysis & Plan - Issue #7Executive SummaryTable cells ( Implementation OverviewHigh-Level Execution Phases
Quick Stats
Complete Analysis & Implementation Details (click to expand)Research FindingsProblem Space
Codebase Research
Affected Files
Integration Points
Implementation PlanAutomated Test Cases to CreateTest File: // Add new test case inside 'Table Conversion' describe block:
it('should wrap table cell content in paragraph nodes per ADF spec', async () => {
// Parse simple markdown table
// Assert each tableHeader.content[0].type === 'paragraph'
// Assert each tableCell.content[0].type === 'paragraph'
// Assert paragraph.content[0].type === 'text'
// Assert empty cells have { type: 'paragraph', content: [] }
});Files to Modify1.
|
Implementation CompleteSummaryWrapped table cell and header content in Changes Made
Validation Results
Detailed Changes by File (click to expand)src/parser/markdown-to-adf/ASTBuilder.tsChanges: Added paragraph wrapping for table cells
src/parser/engines/MarkdownToAdfEngine.tsChanges: Fixed cleanup to preserve empty paragraphs in table cells
Test Files (5 files)Changes: Updated assertions to navigate through new paragraph wrapper layer
|
Table cells and headers now contain block-level paragraph nodes wrapping inline content, as required by the Jira ADF specification. Fixes Jira v3 REST API returning 400 INVALID_INPUT for tables. Changes: - Add wrapCellContentInParagraph() helper in ASTBuilder - Apply wrapping in all three table cell conversion paths - Fix cleanupEmptyParagraphs to preserve empty paragraphs in cells - Update test assertions for new paragraph wrapper layer Fixes JeromeErasmus#7
29e2b4a to
36d5c6a
Compare
Cover the parseTableFromLines code path for tables nested inside panel and expand blocks, verifying cell content is wrapped in paragraph nodes per ADF spec. Fixes JeromeErasmus#7
…Fixes JeromeErasmus#7 - Add comprehensive tests for paragraph wrapping in panel and expand table cells - Verify cells with text nodes are wrapped in paragraph nodes per ADF spec - Verify cells with block-level content remain unchanged - Test nested table and list scenarios within table cells
iloom Session SummaryKey Themes:
Session Details (click to expand)Key Insights
Decisions Made
Challenges Resolved
Lessons Learned
Generated with 🤖❤️ by iloom.ai |
Fixes #7
Table cells contain
textnodes directly instead of wrapping inparagraph— Jira rejects with INVALID_INPUTWhen converting markdown tables to ADF,
tableCellandtableHeadernodes containtextnodes as direct children. The Jira ADF spec requires block-level children (e.g.,paragraph) inside table cells.Input:
Current output (invalid):
{ "type": "tableCell", "content": [{ "type": "text", "text": "c" }] }Expected output:
{ "type": "tableCell", "content": [{ "type": "paragraph", "content": [{ "type": "text", "text": "c" }] }] }Jira's v3 REST API returns a 400 INVALID_INPUT error when posting comments or issue descriptions containing tables. Note that
validateAdf()does not catch this — it passes validation, but Jira rejects it.This PR was created automatically by iloom.