INTEROP-9063: Convert issue descriptions from wiki markup to ADF (fixes #271) - #279
Merged
Merged
Conversation
_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
sg-rh
reviewed
Jul 9, 2026
sg-rh
left a comment
Collaborator
There was a problem hiding this comment.
Looks good, some checks (ruff) failing
…import (ruff F402)
…r | None narrowing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
_get_issue_description()builds Jira Server wiki syntax (*bold*,[text|url],||header||) andcreate_issue()wraps the result withplain_text_to_adf_doc(), dumping the markup into a single literal ADF text node.add_duplicate_comment,add_passing_job_comment) were already converted to ADF and work correctly. This PR applies the same pattern to descriptions.Changes
src/objects/jira_adf.py-- Addedrule(),table(),table_row(),table_header_cell(), andtable_cell()ADF helpers.src/report/report.py-- Converted_get_issue_description()to return an ADF doc dict usingadf_doc(),paragraph(),inline_text(). Converted_get_past_bugs_table()to return an ADF table using the new table helpers.src/objects/jira_base.py-- Updatedcreate_issue()to acceptstr | dictfor thedescriptionparameter. Dict values (ADF) are sanitized directly; strings still go throughplain_text_to_adf_doc()for backward compatibility.create_issue().Test plan
test_firewatch_report_cli_output_for_e2e_parity.pydue toclickAPI incompatibility, unrelated to this change)Fixes #271
Ref: INTEROP-8986