[rt-users] Multiple faces for single queue?
Kenneth Crocker
KFCrocker at lbl.gov
Tue Apr 22 12:54:28 EDT 2008
Tom,
You pretty much stated your own answer. Yes, by using a CF you can set
up several scrips to execute when the value of the CF is "whatever" or
"whatever2", etc. Each scrip would specify a different template to be
used for the customers with the correct value. Example below:
# Condition: User Defined
# Action: Notify Customer type X
# Template: Global template: Ticket Created for X Customer
# condition execution on CF QA Approved
my $trans = $self->TransactionObj;
my $ticket = $self->TicketObj;
if ($trans->Type eq 'CustomField')
{my $cf = new RT::CustomField($RT::SystemUser);
$cf->LoadByName(Queue => $ticket->QueueObj->id,
Name => "Customer Type");
return 0 unless $cf->id;
if ($trans->Field == $cf->id &&
$trans->NewValue eq "X")
{
return 1;
}
}
return 0;
And the same for a different customer type:
# Condition: User Defined
# Action: Notify Customer type Z
# Template: Global template: Ticket Created for Z Customer
# condition execution on CF QA Approved
my $trans = $self->TransactionObj;
my $ticket = $self->TicketObj;
if ($trans->Type eq 'CustomField')
{my $cf = new RT::CustomField($RT::SystemUser);
$cf->LoadByName(Queue => $ticket->QueueObj->id,
Name => "Customer Type");
return 0 unless $cf->id;
if ($trans->Field == $cf->id &&
$trans->NewValue eq "Z")
{
return 1;
}
}
return 0;
These two notification scrips will use a different template for the
customer based on the value of the CF. Hope this helps.
Kenn
LBNL
On 4/21/2008 8:08 PM, Tom Lanyon wrote:
> Hi list,
>
> Is there an existing solution to have a single queue (used for product
> support) to be used for multiple clients? In our case, different
> clients require different support email addresses and ticket auto-
> response messages, but all other queue behavior, watchers, scrips etc
> is the same.
>
> I'm sure it would not be difficult to, on ticket creation, parse the
> incoming messages for a "To:" header and set a "Client" custom field
> based on this. Then for all other actions (auto response, etc), we
> could use this custom field to look up the appropriate templates.
> However, I was wondering if this had already been done, as it seems
> like it would be a common RT usage scenario.
>
> Regards,
> Tom
> _______________________________________________
> http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
>
> Community help: http://wiki.bestpractical.com
> Commercial support: sales at bestpractical.com
>
>
> Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
> Buy a copy at http://rtbook.bestpractical.com
>
More information about the rt-users
mailing list