Uploaded image for project: 'Jira Cloud (including JIRA Core)'
  1. Jira Cloud (including JIRA Core)
  2. JRACLOUD-72051

Wrong mail header when triggering notifications via issue/notify API

    XMLWordPrintable

    Details

    • Support reference count:
      1
    • Feedback Policy:

      Our product teams collect and evaluate feedback from a number of different sources. To learn more about how we use customer feedback in the planning process, check out our new feature policy.

      Description

      Summary

      Notifications triggered via the Jira REST API will have the "reply-to" header as the user who triggered the notification instead of Jira's mail server (jira@instance.atlassian.net). This will cause email replies to go directly to the user, instead of adding a comment to the ticket.

      Steps to Reproduce

      1. In a Jira Cloud instance, create a test ticket. Example: TES-1.
      2. Make sure that some other user has permission to see the ticket.
      3. Execute the following, in order to trigger a notification.
        curl -D- -X POST \
          --url 'https://instance.atlassian.net/rest/api/3/issue/TES-1/notify' \
          -u '<user>:<token>' \
          --header 'Accept: application/json' \
          --header 'Content-Type: application/json' \
          --data '{
          "htmlBody": "Lorem ipsum <strong>dolor</strong> sit amet, consectetur adipiscing elit. Pellentesque eget venenatis elit. Duis eu justo eget augue iaculis fermentum. Sed semper quam laoreet nisi egestas at posuere augue semper.",
          "subject": "Mail Subject",
          "textBody": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque eget venenatis elit. Duis eu justo eget augue iaculis fermentum. Sed semper quam laoreet nisi egestas at posuere augue semper.",
          "to": {
            "users": [
              {
                "name": "<randomuser>",
                "active": true
              }
            ]
          }
        }'

      Expected Results

      The mail header should look like this:

      From: "User who triggered the notification" <jira@instance.atlassian.net>
      Reply-To: jira@instance.atlassian.net
      To: randomuser@mail.com

      Actual Results

      From: "User who triggered the notification" <jira@instance.atlassian.net>
      Reply-To: user_who_triggered_the_notification@mail.com
      To: randomuser@mail.com
      

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            pjunior Paulo Junior
            Votes:
            2 Vote for this issue
            Watchers:
            7 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: