Trying to make different signature per queue. Don’t want to use templates
but $SignatureAboveQuote.
Here I use the callback
rt/local/html/Callbacks/MyCompany/Elements/MessageBox/Default with the
following content:
<%INIT>
Use queue template “Signature” as signature if any, overwise, use the
currentuser’s one
if ( $id ) {
my $SystemTicket = RT::Ticket->new( $RT::SystemUser );
$SystemTicket->Load( $id );
my $QueueSignature = RT::Template->new( $RT::SystemUser );
my ($val, $msg) = $QueueSignature->LoadQueueTemplate( Queue =>
$SystemTicket->QueueObj->Id, Name => ‘Signature’ );
if ( $val && $QueueSignature->Content ) {
my ($queue_signature, ) =
$QueueSignature->_ParseContent(TicketObj => $SystemTicket);
$queue_signature =~ s!^\sContent-Type\s:\s+(.)\s$!!mi;
my $ContentType = $1 || ’ text/plain’;
if ( $ContentType eq ‘text/html’ ) {
$$SignatureRef = “-- ” . $queue_signature;
} else {
$$SignatureRef = “-- \n” . $queue_signature;
}
} else {
$RT::Logger->info(“Unable to load queue template
signature: $msg”);
}
}
</%INIT>
<%ARGS>
$SignatureRef => undef
$id => undef
</%ARGS>
you need to setup a template named “Signature” on queue where you wan’t
queue signature, then the above code will use this signature in place of
user one.
If you don’t wan’t to use a template, you can use above code as example
to access ticket queue name.
Here I use the callback
rt/local/html/Callbacks/MyCompany/Elements/MessageBox/Default with the
following content:
That’s great help and works like a charm, many thanks Emmanuel.
Our company is currently using the RT version 4.4.0 Copyright 1996-2015, is the above relevant for this version?
We are trying to implement signatures, but we would like to implement a different signature of each of the queues we have configured so far (quite a few).
We have been told that signatures have to be applied across all queues, and cannot be done for each queue, is it the case?
That’s an old version of RT, but its does say in this old thread that “it’s on RT 4.2, but should work on 4.4”. As its just a callback have you just tried giving it a go? You can always remove the callback routine if it doesn’t work (I’d probably try it on a separate test/dev instance of RT to your live production one, but running the same version of the code just to be on the safe side).