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

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

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Low Low
    • None
    • 7.1.8
    • Issue - Fields

      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

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

              Unassigned Unassigned
              mmuthusamy Moga
              Votes:
              3 Vote for this issue
              Watchers:
              8 Start watching this issue

                Created:
                Updated: