Start a new topic

Merge Incidents

Can we have the ability to set if we want to delete or close the secondary incidents when we merge them.


Personally, I'd like to delete the secondary incidents, these are usually when a client has emailed about the same thing twice etc....  But I can understand that some would like to keep the secondary incidents too.


Each month I delete about 30 calls which have been merged


2 people like this idea

Hi Stuart,


It is never a good practice to delete tickets from the help desk. So merging might be the best option for you. And when you merge the tickets, the secondary ticket is automatically closed.


I hope this helps.


Thanks.



Hi Narain,


When we merge tickets for the reasons Stuart has raised, and the merged tickets are not deleted, it can really skew our statistics. I understand it's not good practice to delete valid incidents but these are not incidents in their own right.


We like to review our clients on the basis of number of tickets per head, and these merges cloud things. I also manually delete them when I merge and also do a tidy up before producing the monthly reports and have asked my team to do the same (all the information is retained in the master ticket). How can I say to a client "Your users raised 200 tickets this month" when maybe 10% of these are voicemails or replies from 3rd parties etc that have subsequently been merged?


It would be really nice to have the option to pick whether we want this behaviour, or to have the option when merging (eg a "merge and delete" button).


Thanks,


Charlie

Or, alternatively, could you add a 5th Status of "Merged" so we could exclude them from our reporting (which is done externally in Power BI)

Experienced the same issue with our reporting.


We created an Observer Rule:




1 person likes this

Thanks Rachael, I've pinched your rule and it's working like a dream :)

For reference, this seems to have been fixed in Reports, as my reports do not include merged tickets anymore. However, the API (v2) will return merged tickets in your result set, and as of Oct. 2018 there is no way to determine from the metadata that a ticket's been merged into another, which will result in double-counting if you're reporting on the extracted numbers - the same problem the folks above were seeing. 


In speaking with support, there's no way to identify merged tickets in the API result set, or filter for them. 


I ended up implementing the rule above, though I would have preferred that FreshService set the API to exclude merged tickets like they do in Reports, or at least include some metadata in the result set that would allow us to filter the tickets out ourselves. 


Clean up is probably the hardest part once you get used to the idea of deleting these tickets. To find old merged tickets, I did a search for the string "This ticket is closed and merged into ticket". The result set is only 30 at a time. I copied and pasted the whole mess of the result set one page at a time into VS Code and used regex to select all ticket ids (something like [A-Z]{2,3}-[0-9]{3,4}), selected "all occurrences", then copy and paste those IDs out to another file. Then use search and replace to turn this list into a comma delimited string of IDs, then used python to delete each ticket in the list via the API. 


 Here's the code I used, if it helps. Kinda ghetto, but it gets the job done. 

import requests
from base64 import b64encode

FS_KEY=[your api key]
FS_HDR=b64encode(bytes(FS_KEY+":dummypassword","utf-8")).decode("ascii")
BEARER_TOKEN = {"Authorization":FS_HDR}
URL_TICKET="https://yourdomain.freshservice.com/api/v2/tickets/"

def make_fs_call(endpoint,ticketid):
    url = endpoint + str(ticketid)
    response = requests.delete(url,auth=(FS_KEY,"."))
    return response

ticketlist = {id1,id2,id3,id4....id500}

for ticketid in ticketlist:
    print("Deleting ticket " + str(ticketid))
    response = make_fs_call(URL_TICKET,ticketid)
    if response.status_code == 204:
        print("    Response: deleted")
    elif response.status_code == 404:
        print("    Response: not found (already deleted?)")
    elif response.status_code == 405:
        print("    Response: not allowed (already deleted?)")
    else:
        print(f"    WARNING, UNKNOWN RESPONSE: {response.status_code}")

Another way to get at the same thing might be to use a custom status code or add a tag to merged tickets. I tried adding a custom status code via the admin interface for form fields, and it let me do so, but I never saw the status show up as an option for tickets in the GUI. Maybe this would just take some time (more than an hour?). You could use the rule above to tag the ticket with something like "merged" and then examine each ticket for that tag in your result set, but as of now getting the tags on a ticket will double your API call count per the rate limits, so that's not very good. I figured deleting the tickets will at least lessen the likelihood that the ticket will show back up in the numbers again (via someone deleting a tag or changing a status). 

 



Login or Signup to post a comment
JS Bin