update ticket function