Jira Cloud REST API v3 GET issue does not render ADF comment bodies

Apologies for reporting this here, I am not sure where this should go in ecosystem.atlassian.com

It seems that GET /rest/api/3/issue/{issueIdOrKey}?expand=renderedFields does not return rendered comment bodies and instead returns raw ADF output for the renderedFields output.

The v2 API GET /rest/api/2/issue/{issueIdOrKey}?expand=renderedFields on the other hand does return rendered comment bodies.

Is this an issue that can be fixed? Or, alternatively, is there any utility that can transform ADF to HTML/React elements?

Example response from GET /rest/api/2/issue/{issueIdOrKey}?expand=renderedFields
{
    ...,
    "renderedFields": {
        ...,
        "description": "<h1><a name=\"Test123\"></a>Test 123</h1>\n\n<p>Malesuada morbi amet neque hac est risus duis, feugiat at sit vivamus erat quisque tortor, dapibus habitant fermentum ornare eu mattis. Class bibendum sem suscipit odio nullam gravida at risus tellus ante quisque aptent, tincidunt feugiat est lobortis nibh blandit proin hendrerit sagittis magnis. Donec vel <em>habitasse</em> ultrices lacinia nullam vehicula, vivamus ligula quisque <b>purus</b> venenatis, nam ac proin luctus natoque.</p>",
        ...,
        "comment": {
            "comments": [
                {
                    ...,
                    "body": "<p>Enim dictum sociis facilisi</p>",
                    ...

                }
            ],
            "maxResults": 1,
            "total": 1,
            "startAt": 0
        }
    },
    ...
}
Example response from GET /rest/api/3/issue/{issueIdOrKey}?expand=renderedFields
{
    ...,
    "renderedFields": {
        ...,
        "description": "<h1><a name=\"Test123\"></a>Test 123</h1>\n\n<p>Malesuada morbi amet neque hac est risus duis, feugiat at sit vivamus erat quisque tortor, dapibus habitant fermentum ornare eu mattis. Class bibendum sem suscipit odio nullam gravida at risus tellus ante quisque aptent, tincidunt feugiat est lobortis nibh blandit proin hendrerit sagittis magnis. Donec vel <em>habitasse</em> ultrices lacinia nullam vehicula, vivamus ligula quisque <b>purus</b> venenatis, nam ac proin luctus natoque.</p>",
        ...,
        "comment": {
            "comments": [
                {
                    ...,
                    "body": {
                        "version": 1,
                        "type": "doc",
                        "content": [
                            {
                                "type": "paragraph",
                                "content": [
                                    {
                                        "type": "text",
                                        "text": "Enim dictum sociis facilisi"
                                    }
                                ]
                            }
                        ]
                    },
                    ...

                }
            ],
            "maxResults": 1,
            "total": 1,
            "startAt": 0
        }
    },
    ...
}
3 Likes

I just noticed from the create issue screen on https://ecosystem.atlassian.net/ that ACJIRA seems to be the project to report API bugs.

https://ecosystem.atlassian.net/browse/ACJIRA-2349

2 Likes

Hi @tbinna ,

Thanks for reporting the issue.

Regards,
Dugald

Hi, any plan when to fix this issue?