Non-image file references display error in renderedFields/renderedBody and JSM Customer Notifications

XMLWordPrintable

    • Minor

      Issue Summary

      When a non-image file (e.g., .txt, .pdf, .csv) is referenced inline using wiki markup notation 

      (!filename.txt!, !filename.txt|thumbnail!, or !filename.txt|inline!)

       the rendered API output (expand=renderedFields / expand=renderedBody) displays an error instead of a graceful fallback. This same error is also exposed to end customers in JSM Customer Notification emails:

      <span class="error">Unable to embed resource: basic-text.txt of type text/plain</span>

       

      This same error is also exposed to end customers in JSM Customer Notification emails. 

      https://jira.atlassian.com/browse/JSDCLOUD-11572 was closed as Fixed, however the issue persists in the rendered API output and JSM notification emails.

      Steps to Reproduce

      • Create an issue via REST API v2 (POST /rest/api/2/issue) with the description containing a non-image file reference, e.g.:
       "description": "Testing inline file reference:\n\n!basic-text.txt|thumbnail!"
      
      curl -X POST \   -u email:token \   -H "Content-Type: application/json" \   "https://somehost.atlassian.net/rest/api/2/issue" \   -d '{     "fields": {       "project": { "key": "ITSM1" },       "summary": "Test - Non-image attachment rendering",       "issuetype": { "name": "Task" },       "description": "Testing inline file reference:\n\n!basic-text.txt|thumbnail!"     }   }' 
      
      
      • Attach file basic-text.txt to the issue via Add Attachment API
        POST /rest/api/3/issue/{issueKey}/attachments
        
        curl -X POST \
          -u email:token \
          -H "X-Atlassian-Token: no-check" \
          -F "file=@/path/to/basic-text.txt" \
          "https://somehost.atlassian.net/rest/api/3/issue/ITSM1-10/attachments"
        
      • Call: 
        GET /rest/api/3/issue/{issueKey}?expand=renderedFields
      • Observe the renderedFields.description field
      • (Optional) If the issue is in a JSM project with a Request Type and customer Reporter, check the JSM Customer Notification email

      Expected Results

      Non-image file references should gracefully degrade to a clickable link or filename, not display a raw error message, especially in customer-facing notifications.

      Actual Results

      The rendered description shows:

      <p><span class="error">Unable to embed resource: basic-text.txt of type text/plain</span></p>

      The same error is visible to end customers in JSM notification emails.

       

      Workaround

      Currently there is no known workaround for this behavior. A workaround will be added here when available

              Assignee:
              Unassigned
              Reporter:
              Chandra Shekhar Pandey
              Votes:
              8 Vote for this issue
              Watchers:
              8 Start watching this issue

                Created:
                Updated: