[Rt-devel] Ideas about Notify.pm Action
Ham MI-ID, Torsten Brumm
torsten.brumm at Kuehne-Nagel.com
Thu Feb 5 09:10:19 EST 2009
Dear RT Developers,
since a long time i have several requests from my users to have a better handling of AdminCC and CC on queue and ticket level. By default the internal RT Action Notify allows you only to mail to all CC's or AdminCC's but not to devide them into Queue AdminCc's/Cc's or Ticket Admin.
I had a look into the Notify.pm and got the idea to do the following:
Add to the exsisting "Rules" some like this:
if ( $arg =~ /\bQueueCc\b/ ) {
#If we have a To, make the Ccs, Ccs, otherwise, promote them to To
if (@To) {
push ( @Cc, $ticket->QueueObj->Cc->MemberEmailAddresses );
}
else {
push ( @To, $ticket->QueueObj->Cc->MemberEmailAddresses );
}
}
if ( $arg =~ /\bTicketCc\b/ ) {
#If we have a To, make the Ccs, Ccs, otherwise, promote them to To
if (@To) {
push ( @Cc, $ticket->Cc->MemberEmailAddresses );
}
else {
push ( @Cc, $ticket->Cc->MemberEmailAddresses );
}
}
if ( $arg =~ /\bQueueAdminCc\b/ ) {
push ( @Bcc, $ticket->QueueObj->AdminCc->MemberEmailAddresses );
}
if ( $arg =~ /\bTicketAdminCc\b/ ) {
push ( @Bcc, $ticket->AdminCc->MemberEmailAddresses );
}
and also add some scripActions to RT DB like this:
INSERT Into ScripActions(
Name, Description, ExecModule, Argument, Creator, Created, LastUpdatedBy, LastUpdated
) VALUES (
'Notify TicketCcs', 'Sends mail to the Ticket Ccs', 'Notify', 'TicketCc', 1, NOW(), 1, NOW()
);
INSERT Into ScripActions(
Name, Description, ExecModule, Argument, Creator, Created, LastUpdatedBy, LastUpdated
) VALUES (
'Notify QueueCcs', 'Sends mail to the Queue Ccs', 'Notify', 'QueueCc', 1, NOW(), 1, NOW()
);
INSERT Into ScripActions(
Name, Description, ExecModule, Argument, Creator, Created, LastUpdatedBy, LastUpdated
) VALUES (
'Notify QueueAdminCc', 'Sends mail to the Queue AdminCcs', 'Notify', 'QueueAdminCc', 1, NOW(), 1, NOW()
);
INSERT Into ScripActions(
Name, Description, ExecModule, Argument, Creator, Created, LastUpdatedBy, LastUpdated
) VALUES (
'Notify TicketAdminCcs', 'Sends mail to the Ticket Admin Ccs', 'Notify', 'TicketAdminCc', 1, NOW(), 1, NOW()
);
INSERT Into ScripActions(
Name, Description, ExecModule, Argument, Creator, Created, LastUpdatedBy, LastUpdated
) VALUES (
'Notify QueueAdminCc and QueueCc', 'Sends mail to the Queue Admin Ccs and Queue Ccs', 'Notify', 'QueueAdminCc,QueueCc', 1, NOW(), 1, NOW()
);
Does it from your point of view to use this instead of the global "Mail All" Scrips? I've tried it out and it works great so far, now problems....
This also means to replace or rebuild some global scrips and you can easily define the mailing....much esier than scrip them all by hand.
Any Ideas or comments?
Torsten
Kuehne + Nagel (AG & Co.) KG, Geschaeftsleitung: Hans-Georg Brinkmann (Vors.), Uwe Bielang (Stellv.), Bruno Mang, Dirk Blesius (Stellv.), Alfred Manke, Christian Marnetté (Stellv.), Mark Reinhardt (Stellv.), Jens Wollesen, Rainer Wunn, Sitz: Bremen, Registergericht: Bremen, HRA 21928, USt-IdNr.: DE 812773878, Persoenlich haftende Gesellschaft: Kuehne & Nagel A.G., Sitz: Contern/Luxemburg Geschaeftsfuehrender Verwaltungsrat: Klaus-Michael Kuehne
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.bestpractical.com/pipermail/rt-devel/attachments/20090205/4cac8bcb/attachment.htm
More information about the Rt-devel
mailing list