Suppressing email generated by script to import tickets from another ticketing system

Hi,

I have a script which imports tickets from another system using
something like;

foreach(ticket){
$TicketObj->Create(subject, queue, priority, status);
}

etc. However I understand that that is going to trigger the sending of
emails to all the watchers of these queues?

is there any way to suppress that while this script is running?

Thanks,

Tom

Hi,

I have a script which imports tickets from another system using
something like;

foreach(ticket){
$TicketObj->Create(subject, queue, priority, status);
}

etc. However I understand that that is going to trigger the sending of
emails to all the watchers of these queues?

is there any way to suppress that while this script is running?

I’ve previously used the following at the top of my script (after the RT::Init call):

{
no warnings qw/redefine/;
use RT::Action::SendEmail;
sub RT::Action::SendEmail::Commit { 1}
}

If that works for you, I’d be indebted if you could add it to the wiki.

Thanks!
Jesse

Tom H wrote:

I have a script which imports tickets from another system using
something like;

Given I’m probably about to write something similar, I’d be interested
in any script that you’ve come up with to do this…

We’re in the process of merging two RT systems, and there seems to be
little to no code out there for doing this as it stands…

I was going to create the tickets through the RT interface (having
dropped most of it into an XML file. Then copy most of the Transaction,
Link and Attachment data with a little munging directly from one DB into
the other. It was decided that things like User and Group history
weren’t required, and the donor RT server had nothing interesting with
regards templates or custom fields

Mark
Mark Chappell
Unix Systems Administrator