The JSM Mail channel creates new tickets instead of adding comments to existing tickets

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

プラットフォームについて: Server および Data Center のみ。この記事は、Server および Data Center プラットフォームのアトラシアン製品にのみ適用されます。

Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Fisheye および Crucible は除く

    

要約

In Jira Service Management (JSM) project, when a customer replies to a JSM notification (or to an email that was used to create a new ticket), the JSM mail channel should add a comment to the relevant ticket.

However, in some cases, the JSM Mail Channel might create a duplicate ticket instead of adding a new comment to the existing ticket. This KB article lists all the known root causes for this issue and how to identify each of them.

(warning) Note that this KB article only applies to the JSM mail channel (configured in Project Settings > Email Requests), and not to the Jira Mail Handler (configured in ⚙ > System > Incoming Mail).

環境

Jira Service Management (JSM) Server/Data Center 4.0.0 or any higher version.

Explanation around how the JSM Mail Handler decides when to create a new ticket or add a comment to an existing ticket

The JSM mail channel examines various data from any incoming email to decide whether it should create a new JSM request, or add a comment to an existing JSM request:

  • If the JSM Mail Channel is able to detect any trace of an existing issue in an incoming email (via some of the headers of the email source), it will try to add new comment to the existing JSM request, based on some conditions (more details on that below)
  • Otherwise, a new issue will be created

(warning) Note that the same logic is used by both the JSM mail channel and the Jira Mail Handler. The full logic is detailed below:

For a more detailed explanation of how the mail handler looks for any trace of an existing JSM request in an email, you can refer to the panel below:

How does the mail handler look for traces of existing Jira issues in an incoming mail

メール ハンドラーは、メールのソースにある 3 個の場所/ヘッダをチェックして、新しい課題を作成すべきか、既存の課題にコメントを追加すべきかを判断します。

  • メール Subject (件名) 行 (Subject ヘッダー)

    • メール ハンドラーは、件名から課題キーを探し、Jira に一致する課題がある場合、この既存の課題にコメントを追加します。課題キーが見つからない場合には、次のステップに移ります。

  • In-Reply-To および References ヘッダー

    • メール ハンドラーは、既存の Jira チケットにリンクされている message-ID があるかどうかを検出しようとします。上記の 2 ヘッダで何らかの message-ID が見つかった場合、メール ハンドラーはそれを解析し、既存の Jira 課題へのマッピングを試みます。

    • message-ID の形式が「JIRA.12700.1562154694000.1.1562154780223@Atlassian.JIRA」の場合、

      • 「Jira」の後の ID (この例では 12700) が、データベーステーブル jiraissue の ID 列と比較されます。

      • jiraissue テーブルに既存の行が見つかった場合には、既存の課題にコメントが追加されます。

      • (info) Jira 課題から受信した通知メールにユーザーが返信する場合、message-ID はこのような形式になることに注意してください。
    • message-ID が他の形式の場合

      • この message-ID は、データベースのテーブル notificationinstance に格納されているものと比較されます。

        • このテーブルには、各 Jira 課題に関連付けられたすべての メールの message-ID が含まれています( メールが課題の作成に使用されたか、その課題にコメントを追加したかにかかわらず)。

      • 一致するものがある場合には、対応する課題にコメントが追加されます。

      • (info) 新しい Jira 課題の作成に使用されたメールにユーザーが返信した場合、message-ID はランダムな形式になることに注意してください。

If the JSM Mail Channel detects that the incoming email is linked to an existing JSM request, it will try to add a comment on behalf of the sender of the email. Please note that it is only possible if the sender of the email has access to the JSM request by being:

  • either the reporter of the request
  • or a request participant of the request
  • or part of any organization the request is shared with
  • or one of the approvers of the request (if the case the request was configured with an approval status)

If the sender of the email does not have any Jira account, does not have access to the Customer portal, or does not have access to the JSM request, the following will happen:

  • no comment will be added to the existing ticket
  • depending on various conditions, either the email will be dropped, or a new ticket will be created from this email

根本原因

Root Cause 1 - The sender of the email does not have a Jira account, nor access to the JSM Customer Portal

If the sender of the email does not have a Jira account, or does not have access to the Customer Portal (where the JSM Mail Channel is configured), the following will happen:

  • this user will be considered as a non-customer (or external user)
  • if the JSM Mail Channel is not allowed to add comments from external users (based on the Public email comment setting from ⚙ > Applications > Jira Service Management > Email Requests):
    • it will not add a comment to the existing request
    • instead, it will try to create a new request on behalf of this user (provided that this user is allowed to raise requests in the JSM project where the Mail Channel is configured)

Root Cause 2 - The sender of the email has access to the JSM Customer Portal, but does not have access to the JSM ticket

For a user to have access to a JSM ticket, this user needs to be involved in the ticket by being:

  • either the reporter of the request
  • or a request participant of the request
  • or part of any organization the request is shared with
  • or one of the approvers of the request (if the case the request was configured with an approval status)

If the user has access to the Customer Portal, but is not involved in the ticket, the following will happen:

  • this user will not be considered as a non-customer (or external user), since this user has access to the Customer Portal
  • however, since this user does not have access to the ticket, the Mail Handler will instead create a new ticket on behalf of this user

(warning) Note that the Public email comment setting from ⚙ > Applications > Jira Service Management > Email Requests) will not have any effect on this user, since this user has Customer Portal access, and is not considered as a "non-customer (or external user)".

Root Cause 3 - There is an invalid Field Context Configuration

There is a field in the configuration of the the Request Type (associated with the JSM Mail Handler) which has an incorrect context configuration. To ensure that the Mail Handler works as expected and creates issues/comments from incoming emails adequately, the field context needs to include both:

  • the Service Management project this request is configured in
  • and the issue type associated to the request type used by the Mail Handler

This issue is a side effect of the Service Management bug JSDSERVER-7061 - Getting issue details... STATUS

You can find more information about this Root Cause in the KB article The JSM Mail Handler creates new tickets instead of adding comments to existing tickets due to invalid field context configuration Skip to end of metadata.

診断

根本原因の診断 1

Check if the sender of the email:

  • has a Jira account (in the page ⚙ > User Management > Users)
  • and also has access to the Customer Portal where the JSM Mail Handler is configured (as per the Project Settings > Customer Permissions setting)

If the sender of the email does not have access to the Customer Portal (or does not have a Jira account at all), go to the page ⚙ > Applications > Jira Service Management > Email Requests and check if the setting Public email comments is set to No as shown in the screenshot below:

If the Public email comments is set to No, then the Root Cause 1 is relevant and you can move on to the Solution for Root Cause 1 section.

根本原因の診断 2

Check if the sender of the email:

  • has a Jira account (in the page ⚙ > User Management > Users)
  • and also has access to the Customer Portal where the JSM Mail Handler is configured (as per the Project Settings > Customer Permissions setting)

If the sender of the email has a Jira account and access to the Customer Portal, check if this user is involved in the JSM ticket by being:

  • either the reporter of the request
  • or a request participant of the request
  • or part of any organization the request is shared with
  • or one of the approvers of the request (if the case the request was configured with an approval status)

If this user is not involved in the ticket, then Root Cause 2 is relevant, and it is expected that this user cannot add comments to the ticket, since this user does not have access to it. You can move on to the Solution for Root Cause 2 section.

根本原因の診断 3

Please refer to the Diagnosis section of the KB article The JSM Mail Handler creates new tickets instead of adding comments to existing tickets due to invalid field context configuration Skip to end of metadata for more information.

ソリューション

根本原因の解決策 1

To fix the issue, you will need to allow non-customers (external users) to add comments by email to requests they don't have access to.

To do this, go to ⚙ > Applications > Jira Service Management > Email Requests and set the Public email comments setting to Yes as shown in the screenshot below:

(warning)  Important note: These configurations are global and the changes made will take effect on all JSM projects so please be informed.

根本原因の解決策 2

ソリューション 1

One solution consists in adding the sender of the email as a request participant of the existing JSM request. By doing this, this user will be allowed to access the request, but also allowed to add comments to this ticket. This can be done by opening the requests from the customer portal view, and by using the share button.

Please make sure that the setting Who can customers share requests with is set to Any customer or organization, by searching in this project in the affected project > Project settings > Customer permissions page.

Please go through the documentation Managing access to your service project for more details about this setting.

ソリューション 2

Alternatively, what you could do is:

  • Create a new organization in the Customer Portal
  • Group in this organization all the users that should have access to the same tickets
  • Share the request is with this organization

By doing so, all the customers who are part of the same organization will be able to access and comment in requests shared with that organization.

根本原因の解決策 3

Fix the Field Context Configuration. Please refer to the Solution section of the KB article The JSM Mail Handler creates new tickets instead of adding comments to existing tickets due to invalid field context configuration Skip to end of metadata for more information.




最終更新日: 2024 年 2 月 1 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.