How to auto-fill Organizations field when raising request through JSM Widget

お困りですか?

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

コミュニティに質問

プラットフォームについて: Cloud のみ - この記事は、 クラウド プラットフォームのアトラシアン製品にのみ適用されます。

要約

Currently, when raising a request through the JSM Widget, if the user is a member of a customer organization, it won't be possible to share the ticket with their Org because the Widget doesn't have the option "Share with."

This is a workaround for the feature request: JSDCLOUD-6110 - Getting issue details... STATUS

ソリューション

You can create an Automation Rule to verify every new ticket created if it was raised by the "Jira Service Management Widget" user and get the organization for the reporter.

Please note that this workaround will only select the first organization the customer is a member of.
  1. Create an automation rule by following the steps in the  Create and edit Jira automation rules  documentation.
  2. For the trigger, select "Issue Created".
  3. Add a new condition, select "User condition", then configure it as below:
    1. User:  User who triggered the event
    2. Check to perform:  is
    3. Criteria:  Jira Service Management Widget   (user)

  4. Add a new action, select "Send Web Request ," then configure it as below:
    1. Web request URL:
      1. https://your-instance.atlassian.net/rest/servicedeskapi/organization?accountId={{reporter.accountId}}
    2. Headers:

      1. Field 1: Authorization - Basic <token>

      2. Field 2: Accept - application/json

      3. Note: You'll need to generate a token by following the steps in   this documentation: Supply basic auth headers .

    3. HTTP Method:   GET

    4. Web request body:   Empty

    5. Check   " Delay execution of subsequent rule actions until we've received a response for this web request " (Important!)

  5. Add a new action, select   Edit Issue   action, then configure it as below:

    1. Click on "More options," and copy and paste the code below:

      {
       "fields": {
           "Organizations": [{{webResponse.body.values.first.id}}] 
        } 
      }



参考

最終更新日: 2023 年 12 月 5 日

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

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