Hi there. We're in the process of migrating from Freshdesk to JSM Premium and will be migrating all our existing tickets across. As part of that migration process, we will put the Freshdesk ticket ID into a custom field on the issue within JSM, so we have a record. The challenge we have is that once we go live on JSM, if any customer sends an email on a ticket that was originally opened in Freshdesk, then the subject line will have the Freshdesk ticket ID in it, not the JSM issue key, meaning that JSM will consider it a new ticket, rather than a reply to an existing open ticket (that was migrated).
Is there any way of considering these emails as replies to the tickets that are open in JSM via the migration, through some sort of automation rule or similar? I had hoped we could look to match the presence of the FD ticket ID in the subject line with the same value in the custom field of the JSM issue and use that to identify the issue to associate the email with, but I'm not sure if that will work or if there's a better option: I imagine this must be a common challenge for businesses where it is not possible to duel run on 2 ticket systems (as some of our tickets remain open a long time).
Any help/suggestions gratefully received!
Hi @Gamal Lear ,
It happens that i'm currently working on a similar issue. I've solved this with a simple automation rule that is triggered once a new ticket is created in Jira.
The rule will try to retrieve the ticketnumber from the summary by using substring in a smartvalue. Ex. {{issue.summary.substringAfter("#")}} (in this example, the ticketnumber appears after the #-sign).
Then, i added a branch in my automation rule that finds the ticket by using a JQL
Once found, I add the content of the trigger issue as a comment to the existing ticket.
Then, I delete the trigger issue.
Hope this helps,
Best regards,
Kris
Hi Kris, thanks so much for taking the time to share that, it certainly sounds like what we are looking for! Would you be kind enough to share a screenshot or two of the JQL and the rule step for adding the contents of the trigger issue as a comment on the existing ticket? Given it's working well for you, I'd love to replicate the exact approach and do some testing at this end.
Thanks again,
Gamal
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Gamal Lear ,
Sure. After the trigger, I use a "Create Variable" action to extract the ticketnumber from the "Summary" of the ticket. In this example, the ticketnumber appears after the #-sign.
I also save the "Description" in a variable.
Then I create a Branch and use a JQL command to retrieve the ticket. The JQL will be different in your case because you store the ticketnumber in a custom field.
And I use the "Add Comment" action to add the description as a comment to the ticket
Best regards,
Kris
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks again Kris, that's awesome. All makes complete sense. Just one final question if I may! In my situation, the email subject has the Freshdesk ticket ID that following the format [#123456] - so I want to extract the 123456. Substring can be used like you suggest but I end up with 123456] - do you know the syntax to drop the trailing ] after the final digit?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Gamal Lear ,
Please give the "substringBetween" option a try:
{{issue.summary.substringBetween("e","d")}}
Best regards,
Kris
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Kris! That does seem to work but I've been struggling to get the JQL to parse. I've tried various operators as well as both numeric and short text field types for versions of the below, where Grouptextfield is the custom field on the ticket we want to find and FDTicketID is the variable that holds the Freshdesk ID extracted via the above substring:
No matter what I do, I get the error below - it must be a syntax error where it is not including the variable in what's being evaluated. Any ideas what I might be doing wrong?
Gamal
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Gamal Lear ,
Your JQL seems valid.
Does your variable FDTicketID only contain the ticketnumber, or also something more? Have you tried displaying the value in the audit log of the automation rule ?
Best regards,
Kris
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I managed to debug it and it appears to be working well! Top stuff, thanks for all your help Kris.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Gamal Lear ,
Good to hear you got it working.
By clicking the green 'Accept Answer' button you can help other community members identifying helpful posts.
Thank you
Best regards,
Kris
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Will do @Kris Dewachter - you don't happen to know how to delete the trigger issue, as opposed to the issue that is getting the contents of the variable added to it do you?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Have you tried adding the "Delete Issue" action at the end of the automation rule, outside of the branch ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Every day's a school day - yes, outside the branch does the business. I'm sorted now - thanks for the education! :-)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.