Template to create new ticket when queue is changed

The project I’m working on requires that we create a new ticket when an
existing ticket is changed to another queue. The purpose of this
requirement is to reset the Date Created value. I’ve been scouring the wiki
and list archives and found bits of information here and there but while
trying to add 2+2, I’m still coming up with -1. The plan is to create a
scrip that will use a custom condition to check existing and new queue
values then use the Create Tickets action with a template that will transfer
existing ticket values to the new ticket, then finally close the existing

Can someone provide an example of code to use for the custom condition? I
need to check the values of the existing and selected queues.

Also, what else will I need for the content of the template?
This is what I have so far:
Queue => ‘Specialist’,
Subject => $subject,
Owner => ‘root’,
Requestor => $requestor,
MIMEObj => $ticket_body,
CustomField-6 => $CustomField-5

Thanks for your advice – I’m working on a tight deadline. I’ll be happy to
update the wiki with a sample solution once I get this going.