Uploaded image for project: 'Jira Service Management Data Center'
  1. Jira Service Management Data Center
  2. JSDSERVER-6929

Using variable ${event.user.name} when sending a webhook call with automation with a custom payload do not produce the correct value

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Low Low
    • None
    • 4.5.0, 4.5.6, 4.11.0
    • Automation

      Issue Summary

      When creating an automation rule to send a Webhook with a custom payload with the variable ${event.user.name}, the variable is not interpolated with any value and is sent empty.

      -

      This bug was reported in Community Questions, at the following question: https://community.atlassian.com/t5/Jira-Service-Desk-questions/Automation-webhook-custom-payload-variables-missing/qaq-p/1408516

      Steps to Reproduce

      1. Create a custom automation rule, with:
        1. WHEN: "Issue resolution changed";
        2. THEN: "Webhook";
        3. Configure the webhook with a test URL;
        4. Select "Send custom payload" as body type;
        5. Add the following to the payload textarea:
          { "user" : "${event.user.name}" }
        6. Confirm;
      2. Before saving the new rule, click in the "Options" link in the upper-right corner, and select "Run as the user who triggered the rule";
      3. Save the new rule;
      4. Add the webhook test URL to the Whitelist (http://PATH_TO_JIRA/plugins/servlet/whitelist);
      5. Trigger the automation rule by resolving an issue.

      Expected Results

      The webhook should be called with a value like:

      {
        "user": "my_user_name"
      }
      

      Actual Results

      The webhook is called without a value for the user:

      {
        "user": ""
      }

      Workaround

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

              Unassigned Unassigned
              esantos2 Elton Santos
              Votes:
              11 Vote for this issue
              Watchers:
              14 Start watching this issue

                Created:
                Updated: