...
Select method
PUT
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 )In the Authentication method select list select the credential created earlier (Token or OAuth)
In the Body section add
Code Block language js { "ticket": { "comment": { "body": "{{comments.latest.body}}", "public": true } } }
...
Click on the Triggers & Condition tab
We will use the Issue Commented as event to when to send the issue comment to zendesk ticket
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
Click Save
Add a Action to set the ID from the Zendesk ticket in the Jira Issue
Click Create (top menu)
Select Action and enter a name: Add Zendesk ticket number to issue
Select Template Category: Jira Core Server
Select Template: Edit Issue
Click Create
In the configuration select a authentication user to use when updating the Jira issue (Basic Auth)
In the body section paste the code in below and change the customfield id to match your field.
Code Block | ||
---|---|---|
| ||
{
"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
Goto the project that was selected in the Run only on these project(s) and/or JQL and create comment an issue with description.
Result should be a 201 200 OK