Skip to content

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

@amp-rh

Description

@amp-rh

Problem

Since the migration to the new Jira Cloud instance, ticket descriptions created by firewatch render as raw wiki markup text instead of properly formatted content. Bold markers (*text*), links ([text|url]), horizontal rules (----), and tables (||header||) all display as literal characters.

Screenshot of current rendering:

The description shows raw wiki markup like:

*Prow Job Link:* [job-name #1234|https://prow.ci.openshift.org/...]
*Build ID:* 1234
*Classification:* !none
*Failed Step:* some-step

Instead of rendered bold text with clickable links.

Root cause

_get_issue_description() and _get_past_bugs_table() in src/report/report.py still build descriptions as wiki markup strings. The create_issue() method in src/objects/jira_base.py then wraps this string with plain_text_to_adf_doc(), which places the entire wiki markup string as literal plain text inside a single ADF paragraph node.

The Jira Cloud REST API v3 expects Atlassian Document Format (ADF), so the wiki markup is never interpreted.

Scope

The ADF helper library (src/objects/jira_adf.py) already exists and provides adf_doc(), paragraph(), heading(), inline_text(bold=..., url=...), etc. The comment methods (add_duplicate_comment, add_passing_job_comment) have already been converted to use these ADF helpers. Only the description generation and past bugs table remain unconverted.

Methods to update

  • _get_issue_description() in src/report/report.py -- convert from wiki markup string to ADF using existing helpers
  • _get_past_bugs_table() in src/report/report.py -- convert wiki markup table to ADF table structure
  • create_issue() in src/objects/jira_base.py -- accept an ADF doc dict for description instead of (or in addition to) a plain string
  • report_success() in src/report/report.py -- likely also passes a wiki markup description string

What the fix looks like

Replace string concatenation like:

link_line = f"*Prow Job Link:* [{job.name} #{job.build_id}|{link_line_base_url}{job.name}/{job.build_id}]"

With ADF construction using the existing helpers:

paragraph(
    inline_text("Prow Job Link: ", bold=True),
    inline_text(f"{job.name} #{job.build_id}", url=f"{link_line_base_url}{job.name}/{job.build_id}"),
)

Additional context

The comment methods serve as a working reference for how the conversion should look. See add_passing_job_comment() and add_duplicate_comment() for examples that already use the ADF helpers correctly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions