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):

    self->Ticket->subject = "y-m-0001:"
else
    self->Ticket->subject = "y-m-0001:"
-- 
RT Training November 4 & 5 Los Angeles
http://bestpractical.com/training

Reply via email to