Add an expand option to return plain text in the REST API for wiki fields

XMLWordPrintable

    • Type: Suggestion
    • Resolution: Unresolved
    • None
    • Component/s: REST API
    • None
    • 2

      Issue Summary

      We would like to be able to get the plain text of a wiki field.
      Using the /rest/api/2/issue/<issueId>?fields=<field>&expand=renderedFields, we can get an HTML result from the wiki field content, however, we would need to work this result using a parser like html2text, for instance, to get the plain text.

      We need another expand option that could return the plain text of a wiki field.

      Steps to Reproduce

      • Create a new Issue
      • At the description field, add some test using markup options like bold, italic, bullets, etc
      • Call the REST API to get the content of this field
        http://l<jira base url>/rest/api/2/issue/PS74995-3?fields=description&expand=renderedFields

      Expected Results

      • Get the plain text of the description to be used somewhere else

      Actual Results

      • It is not possible to get the plain text, only the markup content or a rendered result in HTML

      Workaround

      • Use a tool like html2text to parse the results

            Assignee:
            Unassigned
            Reporter:
            Murakami [Atlassian Support]
            Votes:
            4 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: