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

Jira Mail Handler when configured with GMAIL is not storing the file MIME type correctly in the DB when processing any incoming mail with any type of attachment.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Low
    • None
    • 8.5.1, 7.13.18, 8.13.1
    • Issue - Attachments
    • None

    Description

      Issue Summary

      When configuring a Jira Mail Handler to a GMAIL mailbox, any attachment coming from an incoming email will be stored in the database with an upper case MIME type, causing the attachments to be displayed as plain text in the issue created by email:

      Steps to Reproduce

      1. Install Jira 8.13.0
      2. Configure a Mail Server connected to a GMAIL mailbox in ⚙ > Incoming Mail
      3. Configure a Jira Mail Handler connected to the GMAIL Mail server with the type "Create a new issue or add a comment to an existing issue"
      4. Send a new email including a PDF file to the GMAIL Mailbox
      5. Wait for the email to be processed and to create a new issue

      Expected Results

      File attachment should show the "pdf" MIME type and it should be available to preview when clicked.

      Actual Results

      Observe that the PDF file has the "plain text" MIME type and that it's impossible to preview it

      Notes

       This issue is not reproducible when the Jira Mail Handler is connected to an OUTLOOK mailbox.
       This issue is not reproducible when using a Service Desk Mail Handler (configured in Service Desk project settings > Email Requests) instead of a Jira Mail Handler.

      Workaround

      • Download the PDF file and view from local desktop.
      • To fix the problem and to be able to preview the PDF file in Jira UI, we can use the below SQL query.
        update fileattachment set mimetype='application/pdf' where issueid=<issue_id_here> and filename='<PDF_FILE_NAME>'; 

      Attachments

        1. G1.png
          G1.png
          251 kB
        2. O1.png
          O1.png
          241 kB

        Issue Links

          Activity

            People

              Unassigned Unassigned
              ssripad@atlassian.com Sumanth Sripad (Inactive)
              Votes:
              2 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated: