Email Priority

Is there a way to set a ticket priority to 50 if the user sets the Email
from outlook to Urgent?

Inside of the headers of the email exists “Priority: Urgent”.

Can that be checked and acted on when a ticket gets created?

Mark Jenks

Network Administrator

iod incorporated

mark.jenks@iodincorporated.com mailto:mark.jenks@iodincorporated.com

920-406-3702

CONFIDENTIALITY NOTICE: The information contained in this email message, including any attachments, may be
privileged, confidential and otherwise protected from disclosure. If the reader of this message is not the
intended recipient, you are hereby notified that any use, dissemination, distribution or copying of this
message, including any attachments, is strictly prohibited. If you have received this email message in
error, please notify the sender by reply email and delete/destroy the email message, including attachments,
and any copies thereof. Although we have taken precautions to minimize the risk of transmitting viruses via
email and attachments thereto, we do not guarantee that either is virus-free, and we accept no liability for
any damages sustained as a result of any such viruses.

Mark,

Priority is a number field in the DataBase and if you use the CBM command
“Priority: Urgent”, RT will kick it out as the wrong format for that field.
However, we have a Custom Field (we have “urgent” as one of the values) and
you could do the same. That way your email could have “CF{whatever}: Urgent”
in it and then a scrip that sets the priority when that CF value is changed.

Just a thought. Hope it helps.

Kenn
LBNLOn Tue, Aug 3, 2010 at 11:17 AM, Mark Jenks mark.jenks@iodincorporated.comwrote:

Is there a way to set a ticket priority to 50 if the user sets the Email
from outlook to Urgent?

Inside of the headers of the email exists “Priority: Urgent”.

Can that be checked and acted on when a ticket gets created?


Mark Jenks

Network Administrator

iod incorporated

mark.jenks@iodincorporated.com

920-406-3702

CONFIDENTIALITY NOTICE: The information contained in this email message,
including any attachments, may be privileged, confidential and otherwise
protected from disclosure. If the reader of this message is not the intended
recipient, you are hereby notified that any use, dissemination, distribution
or copying of this message, including any attachments, is strictly
prohibited. If you have received this email message in error, please notify
the sender by reply email and delete/destroy the email message, including
attachments, and any copies thereof. Although we have taken precautions to
minimize the risk of transmitting viruses via email and attachments thereto,
we do not guarantee that either is virus-free, and we accept no liability
for any damages sustained as a result of any such viruses.

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

What about something like:

http://wiki.bestpractical.com/view/ExtractCustomFieldValues

Cheers,
KenOn Tue, Aug 03, 2010 at 11:22:45AM -0700, Kenneth Crocker wrote:

Mark,

Priority is a number field in the DataBase and if you use the CBM command
“Priority: Urgent”, RT will kick it out as the wrong format for that field.
However, we have a Custom Field (we have “urgent” as one of the values) and
you could do the same. That way your email could have “CF{whatever}: Urgent”
in it and then a scrip that sets the priority when that CF value is changed.

Just a thought. Hope it helps.

Kenn
LBNL

On Tue, Aug 3, 2010 at 11:17 AM, Mark Jenks mark.jenks@iodincorporated.comwrote:

Is there a way to set a ticket priority to 50 if the user sets the Email
from outlook to Urgent?

Inside of the headers of the email exists ?Priority: Urgent?.

Can that be checked and acted on when a ticket gets created?


Mark Jenks

Network Administrator

iod incorporated

mark.jenks@iodincorporated.com

920-406-3702

CONFIDENTIALITY NOTICE: The information contained in this email message,
including any attachments, may be privileged, confidential and otherwise
protected from disclosure. If the reader of this message is not the intended
recipient, you are hereby notified that any use, dissemination, distribution
or copying of this message, including any attachments, is strictly
prohibited. If you have received this email message in error, please notify
the sender by reply email and delete/destroy the email message, including
attachments, and any copies thereof. Although we have taken precautions to
minimize the risk of transmitting viruses via email and attachments thereto,
we do not guarantee that either is virus-free, and we accept no liability
for any damages sustained as a result of any such viruses.

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

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

Create a scrip ‘On Create’ with the following ‘Custom action cleanup code’:

my $ticket;
my $attachment = $self->TransactionObj->Attachments->First;
return 1 unless $attachment;
my $prio = $attachment->GetHeader(‘Priority’);
return 1 unless $prio;

if ( $prio eq ‘Urgent’ ) {
$ticket->SetPriority(50);
}
return 1;

-chrisAm 03.08.2010 20:17, schrieb Mark Jenks:

Is there a way to set a ticket priority to 50 if the user sets the Email
from outlook to Urgent?

Inside of the headers of the email exists �Priority: Urgent�.

Can that be checked and acted on when a ticket gets created?

Okay, I modified the original “On create notify requestors” and put that
code in. Got nothing.
Created a new “On create set priority” and it still didn’t do anything.

-MarkFrom: Christian Loos [mailto:cloos@netcologne.de]
Sent: Wednesday, August 04, 2010 3:54 AM
To: Mark Jenks
Cc: rt-users@lists.bestpractical.com
Subject: Re: Email Priority.

Create a scrip ‘On Create’ with the following ‘Custom action cleanup
code’:

my $ticket;
my $attachment = $self->TransactionObj->Attachments->First;
return 1 unless $attachment;
my $prio = $attachment->GetHeader(‘Priority’);
return 1 unless $prio;

if ( $prio eq ‘Urgent’ ) {
$ticket->SetPriority(50);
}
return 1;

-chris

Is there a way to set a ticket priority to 50 if the user sets the
Email
from outlook to Urgent?

Inside of the headers of the email exists “Priority: Urgent”.

Can that be checked and acted on when a ticket gets created?

CONFIDENTIALITY NOTICE: The information contained in this email message, including any attachments, may be
privileged, confidential and otherwise protected from disclosure. If the reader of this message is not the
intended recipient, you are hereby notified that any use, dissemination, distribution or copying of this
message, including any attachments, is strictly prohibited. If you have received this email message in
error, please notify the sender by reply email and delete/destroy the email message, including attachments,
and any copies thereof. Although we have taken precautions to minimize the risk of transmitting viruses via
email and attachments thereto, we do not guarantee that either is virus-free, and we accept no liability for
any damages sustained as a result of any such viruses.

You have to create a new scrip with:

Description: On Create Set Priority
Condition: On Create
Action: User Defined
Template: Global template: Blank
Stage: TransactionCreate

and my code in ‘Custom action cleanupcode’.

-ChrisAm 04.08.2010 17:28, schrieb Mark Jenks:

Okay, I modified the original “On create notify requestors” and put that
code in. Got nothing.
Created a new “On create set priority” and it still didn’t do anything.

-Mark

-----Original Message-----
From: Christian Loos [mailto:cloos@netcologne.de]
Sent: Wednesday, August 04, 2010 3:54 AM
To: Mark Jenks
Cc: rt-users@lists.bestpractical.com
Subject: Re: Email Priority.

Create a scrip ‘On Create’ with the following ‘Custom action cleanup
code’:

my $ticket;
my $attachment = $self->TransactionObj->Attachments->First;
return 1 unless $attachment;
my $prio = $attachment->GetHeader(‘Priority’);
return 1 unless $prio;

if ( $prio eq ‘Urgent’ ) {
$ticket->SetPriority(50);
}
return 1;

-chris

Am 03.08.2010 20:17, schrieb Mark Jenks:

Is there a way to set a ticket priority to 50 if the user sets the
Email
from outlook to Urgent?

Inside of the headers of the email exists “Priority: Urgent”.

Can that be checked and acted on when a ticket gets created?

That is exactly what I have an when I send an email into the queue with
the priority on, it doesn’t set it. I see it when I show full
headers.

How do you debug a scrip?From: Christian Loos [mailto:cloos@netcologne.de]
Sent: Wednesday, August 04, 2010 10:48 AM
To: Mark Jenks
Cc: rt-users@lists.bestpractical.com
Subject: Re: Email Priority.

You have to create a new scrip with:

Description: On Create Set Priority
Condition: On Create
Action: User Defined
Template: Global template: Blank
Stage: TransactionCreate

and my code in ‘Custom action cleanupcode’.

-Chris

Okay, I modified the original “On create notify requestors” and put
that
code in. Got nothing.
Created a new “On create set priority” and it still didn’t do
anything.

-Mark

-----Original Message-----
From: Christian Loos [mailto:cloos@netcologne.de]
Sent: Wednesday, August 04, 2010 3:54 AM
To: Mark Jenks
Cc: rt-users@lists.bestpractical.com
Subject: Re: Email Priority.

Create a scrip ‘On Create’ with the following ‘Custom action cleanup
code’:

my $ticket;
my $attachment = $self->TransactionObj->Attachments->First;
return 1 unless $attachment;
my $prio = $attachment->GetHeader(‘Priority’);
return 1 unless $prio;

if ( $prio eq ‘Urgent’ ) {
$ticket->SetPriority(50);
}
return 1;

-chris

Am 03.08.2010 20:17, schrieb Mark Jenks:

Is there a way to set a ticket priority to 50 if the user sets the
Email
from outlook to Urgent?

Inside of the headers of the email exists “Priority: Urgent”.

Can that be checked and acted on when a ticket gets created?

CONFIDENTIALITY NOTICE: The information contained in this email message, including any attachments, may be
privileged, confidential and otherwise protected from disclosure. If the reader of this message is not the
intended recipient, you are hereby notified that any use, dissemination, distribution or copying of this
message, including any attachments, is strictly prohibited. If you have received this email message in
error, please notify the sender by reply email and delete/destroy the email message, including attachments,
and any copies thereof. Although we have taken precautions to minimize the risk of transmitting viruses via
email and attachments thereto, we do not guarantee that either is virus-free, and we accept no liability for
any damages sustained as a result of any such viruses.

Mark,

What did you put in Custom Action Preparation Code? It should be a “return
1;”

Kenn
LBNLOn Wed, Aug 4, 2010 at 11:00 AM, Mark Jenks mark.jenks@iodincorporated.comwrote:

That is exactly what I have an when I send an email into the queue with
the priority on, it doesn’t set it. I see it when I show full
headers.

How do you debug a scrip?

-----Original Message-----
From: Christian Loos [mailto:cloos@netcologne.de]
Sent: Wednesday, August 04, 2010 10:48 AM
To: Mark Jenks
Cc: rt-users@lists.bestpractical.com
Subject: Re: Email Priority.

You have to create a new scrip with:

Description: On Create Set Priority
Condition: On Create
Action: User Defined
Template: Global template: Blank
Stage: TransactionCreate

and my code in ‘Custom action cleanupcode’.

-Chris

Am 04.08.2010 17:28, schrieb Mark Jenks:

Okay, I modified the original “On create notify requestors” and put
that
code in. Got nothing.
Created a new “On create set priority” and it still didn’t do
anything.

-Mark

-----Original Message-----
From: Christian Loos [mailto:cloos@netcologne.de]
Sent: Wednesday, August 04, 2010 3:54 AM
To: Mark Jenks
Cc: rt-users@lists.bestpractical.com
Subject: Re: Email Priority.

Create a scrip ‘On Create’ with the following ‘Custom action cleanup
code’:

my $ticket;
my $attachment = $self->TransactionObj->Attachments->First;
return 1 unless $attachment;
my $prio = $attachment->GetHeader(‘Priority’);
return 1 unless $prio;

if ( $prio eq ‘Urgent’ ) {
$ticket->SetPriority(50);
}
return 1;

-chris

Am 03.08.2010 20:17, schrieb Mark Jenks:

Is there a way to set a ticket priority to 50 if the user sets the
Email
from outlook to Urgent?

Inside of the headers of the email exists “Priority: Urgent”.

Can that be checked and acted on when a ticket gets created?

CONFIDENTIALITY NOTICE: The information contained in this email message,
including any attachments, may be
privileged, confidential and otherwise protected from disclosure. If the
reader of this message is not the
intended recipient, you are hereby notified that any use, dissemination,
distribution or copying of this
message, including any attachments, is strictly prohibited. If you have
received this email message in
error, please notify the sender by reply email and delete/destroy the email
message, including attachments,
and any copies thereof. Although we have taken precautions to minimize the
risk of transmitting viruses via
email and attachments thereto, we do not guarantee that either is
virus-free, and we accept no liability for
any damages sustained as a result of any such viruses.

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

Anyone have any suggestions why the below is not working?From: rt-users-bounces@lists.bestpractical.com
[mailto:rt-users-bounces@lists.bestpractical.com] On Behalf Of Mark
Jenks
Sent: Wednesday, August 04, 2010 1:00 PM
To: Christian Loos
Cc: rt-users@lists.bestpractical.com
Subject: Re: [rt-users] Email Priority.

That is exactly what I have an when I send an email into the queue with
the priority on, it doesn’t set it. I see it when I show full
headers.

How do you debug a scrip?

From: Christian Loos [mailto:cloos@netcologne.de]
Sent: Wednesday, August 04, 2010 10:48 AM
To: Mark Jenks
Cc: rt-users@lists.bestpractical.com
Subject: Re: Email Priority.

You have to create a new scrip with:

Description: On Create Set Priority
Condition: On Create
Action: User Defined
Template: Global template: Blank
Stage: TransactionCreate

and my code in ‘Custom action cleanupcode’.

-Chris

Okay, I modified the original “On create notify requestors” and put
that
code in. Got nothing.
Created a new “On create set priority” and it still didn’t do
anything.

-Mark

-----Original Message-----
From: Christian Loos [mailto:cloos@netcologne.de]
Sent: Wednesday, August 04, 2010 3:54 AM
To: Mark Jenks
Cc: rt-users@lists.bestpractical.com
Subject: Re: Email Priority.

Create a scrip ‘On Create’ with the following ‘Custom action cleanup
code’:

my $ticket;
my $attachment = $self->TransactionObj->Attachments->First;
return 1 unless $attachment;
my $prio = $attachment->GetHeader(‘Priority’);
return 1 unless $prio;

if ( $prio eq ‘Urgent’ ) {
$ticket->SetPriority(50);
}
return 1;

-chris

Am 03.08.2010 20:17, schrieb Mark Jenks:

Is there a way to set a ticket priority to 50 if the user sets the
Email
from outlook to Urgent?

Inside of the headers of the email exists “Priority: Urgent”.

Can that be checked and acted on when a ticket gets created?

CONFIDENTIALITY NOTICE: The information contained in this email
message, including any attachments, may be
privileged, confidential and otherwise protected from disclosure. If
the reader of this message is not the
intended recipient, you are hereby notified that any use, dissemination,
distribution or copying of this
message, including any attachments, is strictly prohibited. If you have
received this email message in
error, please notify the sender by reply email and delete/destroy the
email message, including attachments,
and any copies thereof. Although we have taken precautions to minimize
the risk of transmitting viruses via
email and attachments thereto, we do not guarantee that either is
virus-free, and we accept no liability for
any damages sustained as a result of any such viruses.

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

CONFIDENTIALITY NOTICE: The information contained in this email message, including any attachments, may be
privileged, confidential and otherwise protected from disclosure. If the reader of this message is not the
intended recipient, you are hereby notified that any use, dissemination, distribution or copying of this
message, including any attachments, is strictly prohibited. If you have received this email message in
error, please notify the sender by reply email and delete/destroy the email message, including attachments,
and any copies thereof. Although we have taken precautions to minimize the risk of transmitting viruses via
email and attachments thereto, we do not guarantee that either is virus-free, and we accept no liability for
any damages sustained as a result of any such viruses.

Okay, I’m looking at debug. It never runs my new Global Scrip of “On
Create Set Priority”.

-Mark

[Thu Aug 5 19:28:21 2010] [info]:
rt-3.8.8-12447-1281036500-344.1543-4-0@iodincorporated.com #1543/22696

Anyone have any suggestions why the below is not working?

From: rt-users-bounces@lists.bestpractical.com
[mailto:rt-users-bounces@lists.bestpractical.com] On Behalf Of Mark
Jenks
Sent: Wednesday, August 04, 2010 1:00 PM
To: Christian Loos
Cc: rt-users@lists.bestpractical.com
Subject: Re: [rt-users] Email Priority.

That is exactly what I have an when I send an email into the queue with
the priority on, it doesn’t set it. I see it when I show full
headers.

How do you debug a scrip?

From: Christian Loos [mailto:cloos@netcologne.de]
Sent: Wednesday, August 04, 2010 10:48 AM
To: Mark Jenks
Cc: rt-users@lists.bestpractical.com
Subject: Re: Email Priority.

You have to create a new scrip with:

Description: On Create Set Priority
Condition: On Create
Action: User Defined
Template: Global template: Blank
Stage: TransactionCreate

and my code in ‘Custom action cleanupcode’.

-Chris

Okay, I modified the original “On create notify requestors” and put
that
code in. Got nothing.
Created a new “On create set priority” and it still didn’t do
anything.

-Mark

-----Original Message-----
From: Christian Loos [mailto:cloos@netcologne.de]
Sent: Wednesday, August 04, 2010 3:54 AM
To: Mark Jenks
Cc: rt-users@lists.bestpractical.com
Subject: Re: Email Priority.

Create a scrip ‘On Create’ with the following ‘Custom action cleanup
code’:

my $ticket;
my $attachment = $self->TransactionObj->Attachments->First;
return 1 unless $attachment;
my $prio = $attachment->GetHeader(‘Priority’);
return 1 unless $prio;

if ( $prio eq ‘Urgent’ ) {
$ticket->SetPriority(50);
}
return 1;

-chris

Am 03.08.2010 20:17, schrieb Mark Jenks:

Is there a way to set a ticket priority to 50 if the user sets the
Email
from outlook to Urgent?

Inside of the headers of the email exists “Priority: Urgent”.

Can that be checked and acted on when a ticket gets created?

CONFIDENTIALITY NOTICE: The information contained in this email
message, including any attachments, may be
privileged, confidential and otherwise protected from disclosure. If
the reader of this message is not the
intended recipient, you are hereby notified that any use, dissemination,
distribution or copying of this
message, including any attachments, is strictly prohibited. If you have
received this email message in
error, please notify the sender by reply email and delete/destroy the
email message, including attachments,
and any copies thereof. Although we have taken precautions to minimize
the risk of transmitting viruses via
email and attachments thereto, we do not guarantee that either is
virus-free, and we accept no liability for
any damages sustained as a result of any such viruses.

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

CONFIDENTIALITY NOTICE: The information contained in this email message, including any attachments, may be
privileged, confidential and otherwise protected from disclosure. If the reader of this message is not the
intended recipient, you are hereby notified that any use, dissemination, distribution or copying of this
message, including any attachments, is strictly prohibited. If you have received this email message in
error, please notify the sender by reply email and delete/destroy the email message, including attachments,
and any copies thereof. Although we have taken precautions to minimize the risk of transmitting viruses via
email and attachments thereto, we do not guarantee that either is virus-free, and we accept no liability for
any damages sustained as a result of any such viruses.

Okay! Figured it out.

Set Priority should be:

$self->TicketObj->SetPriority( 100 );

Also, I needed a Return 1; in the preparation line.From: Mark Jenks
Sent: Thursday, August 05, 2010 11:39 AM
To: Mark Jenks; Christian Loos
Cc: rt-users@lists.bestpractical.com
Subject: RE: [rt-users] Email Priority.

Anyone have any suggestions why the below is not working?

From: rt-users-bounces@lists.bestpractical.com
[mailto:rt-users-bounces@lists.bestpractical.com] On Behalf Of Mark
Jenks
Sent: Wednesday, August 04, 2010 1:00 PM
To: Christian Loos
Cc: rt-users@lists.bestpractical.com
Subject: Re: [rt-users] Email Priority.

That is exactly what I have an when I send an email into the queue with
the priority on, it doesn’t set it. I see it when I show full
headers.

How do you debug a scrip?

From: Christian Loos [mailto:cloos@netcologne.de]
Sent: Wednesday, August 04, 2010 10:48 AM
To: Mark Jenks
Cc: rt-users@lists.bestpractical.com
Subject: Re: Email Priority.

You have to create a new scrip with:

Description: On Create Set Priority
Condition: On Create
Action: User Defined
Template: Global template: Blank
Stage: TransactionCreate

and my code in ‘Custom action cleanupcode’.

-Chris

Okay, I modified the original “On create notify requestors” and put
that
code in. Got nothing.
Created a new “On create set priority” and it still didn’t do
anything.

-Mark

-----Original Message-----
From: Christian Loos [mailto:cloos@netcologne.de]
Sent: Wednesday, August 04, 2010 3:54 AM
To: Mark Jenks
Cc: rt-users@lists.bestpractical.com
Subject: Re: Email Priority.

Create a scrip ‘On Create’ with the following ‘Custom action cleanup
code’:

my $ticket;
my $attachment = $self->TransactionObj->Attachments->First;
return 1 unless $attachment;
my $prio = $attachment->GetHeader(‘Priority’);
return 1 unless $prio;

if ( $prio eq ‘Urgent’ ) {
$ticket->SetPriority(50);
}
return 1;

-chris

Am 03.08.2010 20:17, schrieb Mark Jenks:

Is there a way to set a ticket priority to 50 if the user sets the
Email
from outlook to Urgent?

Inside of the headers of the email exists “Priority: Urgent”.

Can that be checked and acted on when a ticket gets created?

CONFIDENTIALITY NOTICE: The information contained in this email
message, including any attachments, may be
privileged, confidential and otherwise protected from disclosure. If
the reader of this message is not the
intended recipient, you are hereby notified that any use, dissemination,
distribution or copying of this
message, including any attachments, is strictly prohibited. If you have
received this email message in
error, please notify the sender by reply email and delete/destroy the
email message, including attachments,
and any copies thereof. Although we have taken precautions to minimize
the risk of transmitting viruses via
email and attachments thereto, we do not guarantee that either is
virus-free, and we accept no liability for
any damages sustained as a result of any such viruses.

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

CONFIDENTIALITY NOTICE: The information contained in this email message, including any attachments, may be
privileged, confidential and otherwise protected from disclosure. If the reader of this message is not the
intended recipient, you are hereby notified that any use, dissemination, distribution or copying of this
message, including any attachments, is strictly prohibited. If you have received this email message in
error, please notify the sender by reply email and delete/destroy the email message, including attachments,
and any copies thereof. Although we have taken precautions to minimize the risk of transmitting viruses via
email and attachments thereto, we do not guarantee that either is virus-free, and we accept no liability for
any damages sustained as a result of any such viruses.

Sorry for the confusion. I wrote the scrip out of my mind and missed
these two point.

A good starting point for you custom actions is always the wiki:
http://wiki.bestpractical.com/view/WriteCustomAction

-ChrisAm 06.08.2010 03:27, schrieb Mark Jenks:

Okay! Figured it out.

Set Priority should be:

$self->TicketObj->SetPriority( 100 );

Also, I needed a Return 1; in the preparation line.