added the code for the old version of crm_ticket