Sorry, hit the wrong button and sent early...
Hello,
I want to write a custom script at OnCreate that sets the subject of the
new Ticket.
Our Subject format starts with:
YYYY-MM-XXXX: [TEXT] where YY is the year, MM is the month, and XXXX is a
incrementing number.
So in pseudo code, I would like to say
(y,m,d) = getDate(Y-m-d).split('-')
last_ticket_subj = last_created_ticket().split(':')[0]
(ly,lm,lx) = split('-')
if (y==ly AND m==lm):
newx = (int)lx + 1
self->Ticket->subject = "y-m-newx:"
else
self->Ticket->subject = "y-m-0001:
I know that this is not functional code but I think it gets the point
across. How do I get the last ticket subject out of RT and how do I set
the new tickets subject?
Thanks for your help and sorry for the two emails.
--
RT Training November 4 & 5 Los Angeles
http://bestpractical.com/training