Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Select method PUT

  2. Add URL {your_instance_url}/api/v2/tickets/{{issue.customfield_10201}}
    Use the custom field id that you stored the Zendesk ticket id (from tutorial https://rixter.atlassian.net/wiki/pages/resumedraft.action?draftId=1307410435 )

  3. In the Authentication method select list select the credential created earlier (Token or OAuth)

  4. In the Body section add

    Code Block
    languagejs
    {
      "ticket": {
        "comment": {
          "body": "{{comments.latest.body}}",
          "public": true
        }
      }
    }
    

...

  1. Click on the Triggers & Condition tab

  2. We will use the Issue Commented as event to when to send the issue comment to zendesk ticket

  3. Use the condition Run only on these project(s) and/or JQL and select the Jira project that will be the source for all Zendesk issues

  4. Click Save

Add a Action to set the ID from the Zendesk ticket in the Jira Issue

  1. Click Create (top menu)

  2. Select Action and enter a name: Add Zendesk ticket number to issue

  3. Select Template Category: Jira Core Server

  4. Select Template: Edit Issue 

  5. Click Create

  6. In the configuration select a authentication user to use when updating the Jira issue (Basic Auth)

  7. In the body section paste the code in below and change the customfield id to match your field.

Code Block
languagejs
{
    "fields":{"customfield_10201":"{{id}}"}
}

Note. If you have not setup a field to add the ticket number in from external system, then add a new Text field in Jira and add that to the Jira project, context and screen.

Testing

  1. Goto the project that was selected in the Run only on these project(s) and/or JQL and create comment an issue with description.

  2. Result should be a 201 200 OK