I'd like an action that removes all [user|technician|admin] subscribers from a ticket. I would use this when transferring a ticket to a different section/tech group, to prevent the former group from continuing to receive ticket updates.
BK
Ben Katz 5/25/2019 2:00 AM
I don't know if you're using the custom Javascript, but that's how I addressed a similar problem.
Here's my code:
var currentTicket = $("#h2TicketId").text();
//loop through everyone you want to unsubscribe (it doesn't do any harm to try to unsubscribe someone who isn't subscribed) //you can also get them from the URL of their user details page: https://[subdomainhere].jitbit.com/helpdesk/User/View/[usernumber]
Here's my code:
var currentTicket = $("#h2TicketId").text();
//loop through everyone you want to unsubscribe (it doesn't do any harm to try to unsubscribe someone who isn't subscribed)
//you can also get them from the URL of their user details page: https://[subdomainhere].jitbit.com/helpdesk/User/View/[usernumber]
ImmediatelyRemoveSubscriber(currentTicket,'[usernumber]');
function ImmediatelyRemoveSubscriber(ticketId, userId) {
var url = "https://[subdomainhere].jitbit.com/helpdesk/Ticket/RemoveSubscriber";
var data = "ticketId=" + ticketId + "&userId=" + userId;
$.post(url, data);
}