Skip to content

INTEROP-9063: Convert issue descriptions from wiki markup to ADF (fixes #271) - #279

Merged
amp-rh merged 3 commits into
RedHatQE:mainfrom
amp-rh:fix/convert-descriptions-to-adf
Jul 10, 2026
Merged

INTEROP-9063: Convert issue descriptions from wiki markup to ADF (fixes #271)#279
amp-rh merged 3 commits into
RedHatQE:mainfrom
amp-rh:fix/convert-descriptions-to-adf

Conversation

@amp-rh

@amp-rh amp-rh commented Jun 25, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Issue descriptions created by firewatch render as raw wiki markup after the Jira Cloud migration because _get_issue_description() builds Jira Server wiki syntax (*bold*, [text|url], ||header||) and create_issue() wraps the result with plain_text_to_adf_doc(), dumping the markup into a single literal ADF text node.
  • Comments (add_duplicate_comment, add_passing_job_comment) were already converted to ADF and work correctly. This PR applies the same pattern to descriptions.

Changes

  1. src/objects/jira_adf.py -- Added rule(), table(), table_row(), table_header_cell(), and table_cell() ADF helpers.
  2. src/report/report.py -- Converted _get_issue_description() to return an ADF doc dict using adf_doc(), paragraph(), inline_text(). Converted _get_past_bugs_table() to return an ADF table using the new table helpers.
  3. src/objects/jira_base.py -- Updated create_issue() to accept str | dict for the description parameter. Dict values (ADF) are sanitized directly; strings still go through plain_text_to_adf_doc() for backward compatibility.
  4. Tests -- Added tests for new ADF helpers (rule, table, table_cell, table_header_cell) and a test for the dict pass-through path in create_issue().

Test plan

  • All 71 relevant unit tests pass
  • 257/261 total unit tests pass (4 pre-existing failures in test_firewatch_report_cli_output_for_e2e_parity.py due to click API incompatibility, unrelated to this change)

Fixes #271
Ref: INTEROP-8986

_get_issue_description() and _get_past_bugs_table() in report.py were
building Jira Server wiki markup strings (*bold*, [text|url], ||header||).
create_issue() wrapped these with plain_text_to_adf_doc(), which placed the
entire markup into a single ADF text node. Jira Cloud rendered this as
literal text since REST API v3 expects Atlassian Document Format.

Changes:
- Add ADF table helpers (rule, table, table_row, table_header_cell,
  table_cell) to jira_adf.py
- Convert _get_issue_description() to return an ADF doc dict built with
  the same paragraph/inline_text pattern used by comments
- Convert _get_past_bugs_table() to return an ADF table dict
- Update create_issue() to accept str | dict for the description parameter,
  preserving backward compatibility for plain string callers
- Add unit tests for new ADF helpers and the dict pass-through path

INTEROP-8986
@amp-rh amp-rh changed the title Convert issue descriptions from wiki markup to ADF (fixes #271) INTEROP-9063: Convert issue descriptions from wiki markup to ADF (fixes #271) Jul 6, 2026

@sg-rh sg-rh left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, some checks (ruff) failing

@amp-rh
amp-rh merged commit ae2e439 into RedHatQE:main Jul 10, 2026
3 checks passed
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.

Jira ticket descriptions use wiki markup instead of ADF, rendering as raw text

2 participants