Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How to Append the Jira Issue Key to a Private Comment in Zendesk When the Issue is Closed

Integrating Jira and Zendesk combines the strengths of Jira’s project management capabilities with Zendesk’s comprehensive customer support features. 

We’ll discuss a commonly encountered scenario: when an issue is resolved in Jira, a private comment containing the associated Jira issue key is automatically appended to the relevant Zendesk ticket. 

In the following sections, we’ll discuss the use case requirements and the step-by-step configuration to set it up using an integration tool called Exalate

The Use Case

Customer support teams need visibility on the ticket status once the dev team starts working on it. Stemming from this need, we had a customer with the following requirements: 

  • Ticket summary, description, status, tags, and public comments must be synced from Zendesk to Jira. 
  • Jira issue status should be mapped to the ticket status in Zendesk. When the issue is in “In Progress” in Jira, it must be changed to “Open” in Zendesk. 
  • When the issue is marked “Done” in Jira, a comment saying: “Fix has been released by the Dev team for UD-386” must be added to the private comments in Zendesk. Here, UD-386 is the Jira issue key. 

The Challenge

It’s easy to sync the ticket summary, description, tags, etc since they are out-of-the-box sync configurations for most of the integration providers in the market. 

The real challenge lies in appending a fixed comment to the public comments in Zendesk with the actual Jira issue key that resolves the ticket. 

We’ll also need to use code-based solutions to implement this use case since it’s challenging with ready-made integration templates. We’ll need to ensure that the code written is error-free. 

In an integration setup, network timeout errors also need to be taken into account. 

Keeping in mind all these considerations, we’ll use Exalate to implement the use case. 

 

Why Choose Exalate to Implement This Use Case? 

Exalate is a synchronization solution that facilitates the exchange of data between work management systems and online repositories in both directions. It supports various platforms like Zendesk, Azure DevOps, ServiceNow, Jira, Salesforce, GitHub, and more.

What are the advantages of using Exalate?

  1. It provides a seamless synchronization process for Jira issues and Zendesk tickets, requiring only a few clicks.
  2. With Exalate's Groovy scripting engine, you can create customized rules to address advanced use cases.
  3. The Bulk Exalate and Bulk Connect features enable the synchronization of multiple issues and tickets simultaneously.
  4. Exalate ensures the security of your data by safeguarding sensitive information during sharing.

 

How to Append the Jira Issue Key to a Private Comment in Zendesk When the Issue is Closed?

You need to install Exalate on both the Jira Cloud and Zendesk instances. Next, create a connection in the Script mode

Note: You can check out the Exalate Academy or the Getting Started Guide for more information. 

With Exalate's Script mode, you get the flexibility to write your own Groovy scripts, allowing you to control the data transferred to the other side. 

Proceed to click on the edit icon in the “Connections” tab in front of the connection name. You can also click the “Configure Sync” button to edit the connection. 

Navigate to the “Rules” tab in the Zendesk Exalate node and locate the “Incoming sync”. 

image3.png

Insert the following code: 

issue.labels = replica.labels
issue.summary      = replica.summary
issue.description  = replica.description ?: "No description"
issue.attachments  = attachmentHelper.mergeAttachments(issue, replica)
issue.comments     += replica.addedComments

def statusMapping = ["Done":"open", "In Progress":"open"]
def remoteStatusName = replica.status.name
issue.setStatus(statusMapping[remoteStatusName] ?: "open")

if(remoteStatusName == "Done")
    issue.comments += commentHelper.addComment("Fix has been released by the Dev team for: "+replica.key, issue.comments)

The code maps the Zendesk status with the Jira status. For instance, when the engineering team in Jira starts working on the issue (status: “In Progress”), the ticket in Zendesk is marked “Open”. 

Once the issue is marked “Done” in Jira, we use the commentHelper’s addComment method to add a comment on the Zendesk instance that consists of the appended Jira issue key. 

Click “Publish” to save the changes you’ve made. 



The Output

To see if the use case is working, go to your Zendesk instance and open the ticket you want to sync. Click on the “Apps” icon on the right side and click on the “Exalate” button. Select the connection you’ve just created from the list. 

image2.png

The ticket will now be synced to Jira as an issue. The ticket summary, description, and other details will also be copied to the Jira issue. 

Note: We’re manually syncing the ticket here, but you can also set up automatic sync triggers in JQL (Jira Query Language) for Jira and Zendesk search syntax for Zendesk.  

Let’s mark the issue as “Done” in Jira now. 

Exalate automatically picks this update and leaves a comment appended with the Jira issue key in the Zendesk instance. 

image1.png

Conclusion

Exalate enables the synchronization between Jira and Zendesk. Additionally, it allows you to configure personalized rules and triggers for automating the sync process. These data synchronization capabilities streamline your daily operations and enhance customer service delivery. 

If you have any queries or wish to witness how Exalate can be tailored to your unique requirements, we encourage you to schedule a demo session with one of our experts.

0 comments

Comment

Log in or Sign up to comment
TAGS
AUG Leaders

Atlassian Community Events