Here's a hook to do it for ya: https://github.com/websavers/WHMCS-Hook-Auto-Release-Ticket-Info