Automatically set due date and priority based on custom field

Hello,

I’d like to automatically set the due date and priority of new tickets
based on a users selection of the custom field ‘severity’. The creation of
the custom field ‘severity’ was the easy part. My understanding is that
the automatic setting of due date and priority based on this custom field
can be accomplished with a scrip. Has anyone done anything similar to
this?

Thanks.

-Matt

I’ve set the due date based on a due date embedded into the request. If
the user says “DateDue: Feb 28, 2006 2:00” it’ll set the duedate to that
specified date.

It’s not exactly what you are asking for, but maybe it helps get you
started. I think there is some date manipulation you can perform within
WebRT via the RT::Date class.

-eric

Condition: On Create
Template: Blank
Action:

my $AttachObj = $self->TransactionObj->Attachments->First;

go out if content is not text!

unless( $AttachObj->ContentType =~ /^text/ ) {
return 1;
}

my $content = $AttachObj->Content;

if ($content =~ m/^\QDate-Due:\E\s*([-0-9:\s]+[0-9])\s*$/m) {
$self->TicketObj->_Set(Field => “Due”, Value => $1);
}

Matt Nichols wrote: