Uploaded image for project: 'Jira Server and Data Center'
  1. Jira Server and Data Center
  2. JRASERVER-61876

Custom field is not rendering HTML content in JIRA 7 and above

    XMLWordPrintable

    Details

      Description

      Summary

      Custom field in JIRA 7 is not rendering HTML content instead it's showing the content of the HTML as plain text.

      Steps to Reproduce

      1. Set up JIRA 6.4.12.
      2. Create a new project.
      3. Add a custom field with type Text Field (read only) and associate the custom field to the new project.
      4. Create a new issue at the new project - let's say issue ID is MOGA -1
      5. Insert the custom field value via REST API because this custom field type is read-only. The value needs to be in HTML format, for example:
        <a href=%22http://localhost:8081/browse/MOGA-1%22>MOGA-1</a>
        

        Example REST API is:

        PUT http://localhost:8080/rest/api/2/issue/MOGA-1
        

        with body:

        {
            "update" : {
                "customfield_10000" : [{"set" : "<a href=%22http://localhost:8081/browse/MOGA-1%22>MOGA-1</a>"}]
            }
        }
        
      6. Notice that the value for the custom field on issue MOGA-1 - properly rendered HTML content. Refer to the Expected Result.
      7. Repeat the same steps on JIRA 7.1.8.
      8. Notice that the content of the custom field shows as plain text. Refer to the Actual Result.

      Expected Results

      Actual Results

        Attachments

        1. jira6.png
          69 kB
          Mogavenasan Muthusamy
        2. jira7.png
          70 kB
          Mogavenasan Muthusamy
        3. Screen Shot 2016-07-15 at 14.52.09.png
          128 kB
          Ilya Zinoviev

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              mmuthusamy Mogavenasan Muthusamy (Inactive)
              Votes:
              2 Vote for this issue
              Watchers:
              8 Start watching this issue

                Dates

                Created:
                Updated: