Due dates based on custom fields

So, I want to use custom fields to classify the tickets on the support
queue as some pre-defined services. Each service has a defined SLA. I
am also using escalation of tickets based on due date. Is there
anything out that can define the due date of tickets based on those
custom fields? I saw the SLA extension but it looks like SLA per
queue, while what I want is per ticket.

José de Paula Eufrásio Júnior (coredump)
MCSO, GRC Professional
http://core.eti.br

Hi Jose,

Check out the RT::SLA add on works great, and is easy to set up.On Tue, Jan 19, 2010 at 8:54 PM, Jose de Paula Eufrasio Junior < jose.junior@gmail.com> wrote:

So, I want to use custom fields to classify the tickets on the support
queue as some pre-defined services. Each service has a defined SLA. I
am also using escalation of tickets based on due date. Is there
anything out that can define the due date of tickets based on those
custom fields? I saw the SLA extension but it looks like SLA per
queue, while what I want is per ticket.


José de Paula Eufrásio Júnior (coredump)
MCSO, GRC Professional
http://core.eti.br


The rt-users Archives

Community help: http://wiki.bestpractical.com
Commercial support: sales@bestpractical.com

2010 RT Training Sessions!
San Francisco, CA, USA - Feb 22 & 23
Dublin, Ireland - Mar 15 & 16
Boston, MA, USA - April 5 & 6
Washington DC, USA - Oct 25 & 26

Discover RT’s hidden secrets with RT Essentials from O’Reilly Media.
Buy a copy at http://rtbook.bestpractical.com

Bill

Hi Jose,

Damn laptop, clicked send before I was ready.

at any rate the SLA extension is per ticket, you can also have defaults
based on queue.

thanks,
BillOn Tue, Jan 19, 2010 at 9:22 PM, William Graboyes < william.graboyes@theportalgrp.com> wrote:

Hi Jose,

Check out the RT::SLA add on works great, and is easy to set up.

On Tue, Jan 19, 2010 at 8:54 PM, Jose de Paula Eufrasio Junior < jose.junior@gmail.com> wrote:

So, I want to use custom fields to classify the tickets on the support
queue as some pre-defined services. Each service has a defined SLA. I
am also using escalation of tickets based on due date. Is there
anything out that can define the due date of tickets based on those
custom fields? I saw the SLA extension but it looks like SLA per
queue, while what I want is per ticket.


José de Paula Eufrásio Júnior (coredump)
MCSO, GRC Professional
http://core.eti.br


The rt-users Archives

Community help: http://wiki.bestpractical.com
Commercial support: sales@bestpractical.com

2010 RT Training Sessions!
San Francisco, CA, USA - Feb 22 & 23
Dublin, Ireland - Mar 15 & 16
Boston, MA, USA - April 5 & 6
Washington DC, USA - Oct 25 & 26

Discover RT’s hidden secrets with RT Essentials from O’Reilly Media.
Buy a copy at http://rtbook.bestpractical.com


Bill

We have an “Urgency” custom field in one of our queues, and I wrote a couple of scrips to set the ticket due date and starting and ending priorities based on that field’s value. (One scrip fires on ticket creation, and one fires on a change to the custom field’s value.)

The scrip configuration for the ticket creation one looks like:

Condition: On Create
Action: User Defined
Template: Global template: Blank
Stage: TransactionCreate
Custom Action Preparation Code:
Return (1);
Custom Action Cleanup Code
my $ticket = $self->TicketObj;
my $CFName = ‘Urgency’;
my $QueueObj = $self->TicketObj->QueueObj;
my $CFObj = RT::CustomField->new ($QueueObj->CurrentUser);
my $duedate = RT::Date->new($RT::SystemUser);
my $bus_hours_duetime = time;

use Business::Hours;
my $hours = Business::Hours->new();
my $now = time;

$CFObj->LoadByNameAndQueue(Name=>$CFName, Queue=>$QueueObj->id);
unless ($CFObj->id) {
  $RT::Logger->warning ("$CFName doesn't exist in Queue " . $QueueObj->Name);
  return undef;
}

my $urgencyvalue = $self->TicketObj->FirstCustomFieldValue($CFObj->id);
if ($urgencyvalue eq 'Emergency') {
  $self->TicketObj->SetPriority('100');
  $self->TicketObj->SetFinalPriority('100');
  $bus_hours_duetime = $hours->add_seconds ($now, 14400);
  $duedate->Set(Format=>'unix', Value=>$bus_hours_duetime);
  $self->TicketObj->SetDue($duedate->ISO);
} elsif ($urgencyvalue eq 'Urgent') {
  $self->TicketObj->SetPriority('90');
  $self->TicketObj->SetFinalPriority('99');
  $bus_hours_duetime = $hours->add_seconds ($now, 32400);
  $duedate->Set(Format=>'unix', Value=>$bus_hours_duetime);
  $self->TicketObj->SetDue($duedate->ISO);
} elsif ($urgencyvalue eq 'Time-Sensitive') {
  $self->TicketObj->SetPriority('89');
  $self->TicketObj->SetFinalPriority('89');
  $bus_hours_duetime = $hours->add_seconds ($now, 97200);
  $duedate->Set(Format=>'unix', Value=>$bus_hours_duetime);
  $self->TicketObj->SetDue($duedate->ISO);
} elsif ($urgencyvalue eq 'High') {
  $self->TicketObj->SetPriority('75');
  $self->TicketObj->SetFinalPriority('88');
  $duedate->Set(Format=>'unknown', Value=>'15 days');
  $self->TicketObj->SetDue($duedate->ISO);
} elsif ($urgencyvalue eq 'Medium') {
  $self->TicketObj->SetPriority('50');
  $self->TicketObj->SetFinalPriority('74');
  $duedate->Set(Format=>'unknown', Value=>'3 months');
  $self->TicketObj->SetDue($duedate->ISO);
} elsif ($urgencyvalue eq 'Low') {
  $self->TicketObj->SetPriority('25');
  $self->TicketObj->SetFinalPriority('49');
  $duedate->Set(Format=>'unknown', Value=>'6 months');
  $self->TicketObj->SetDue($duedate->ISO);
} elsif ($urgencyvalue eq 'Very Low') {
  $self->TicketObj->SetPriority('1');
  $self->TicketObj->SetFinalPriority('24');
  $duedate->Set(Format=>'unknown', Value=>'1 year');
  $self->TicketObj->SetDue($duedate->ISO);
} else {
}
return(1);

(The Business::Hours library is used by the first three urgency values to ensure that short-term tickets come due during our working hours.)

Mark Roedel
Webmaster
LeTourneau University-----Original Message-----
From: rt-users-bounces@lists.bestpractical.com [mailto:rt-users-bounces@lists.bestpractical.com] On Behalf Of Jose de Paula Eufrasio Junior
Sent: Tuesday, January 19, 2010 10:54 PM
To: rt-users
Subject: [rt-users] Due dates based on custom fields

So, I want to use custom fields to classify the tickets on the support
queue as some pre-defined services. Each service has a defined SLA. I
am also using escalation of tickets based on due date. Is there
anything out that can define the due date of tickets based on those
custom fields? I saw the SLA extension but it looks like SLA per
queue, while what I want is per ticket.

José de Paula Eufrásio Júnior (coredump)
MCSO, GRC Professional
http://core.eti.br