Uploaded image for project: 'Jira Data Center'
  1. Jira Data Center
  2. JRASERVER-72298

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

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Unresolved
    • None
    • REST API
    • None
    • We collect Jira feedback from various sources, and we evaluate what we've collected when planning our product roadmap. To understand how this piece of feedback will be reviewed, see our Implementation of New Features Policy.

    Description

      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

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              imurakami@atlassian.com Murakami
              Votes:
              3 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated: