Okay fellow sysadmins. I've a puzzle I can't seem to solve, so I'll throw it up and see if anyone has any ideas. If you don't know or care about RT and/or Perl, you can just ignore this thread. Trying to solve the problem below. It's not an urgent priority, and I don't really agree with the reasoning behind it, but in any case we've been asked to modify a user queue on the CI RT server such that:
When a ticket comes in unclaimed, mail should go to all admins. However, when the ticket is claimed then only the owner of the ticket gets any further mail.
I found what claims to be a solution to this, but I can't get the script working. This is on the CI RT instance (ie, no hacks to mail functions). Here's the config and script: === Condition: On Owner Change Action: User Defined Template: Blank Stage: TransactionCreate Custom Condition: Custom action preparation code: foreach my $address($self->TicketObj->QueueObj->Cc->MemberEmailAddresses){ $self->TicketObj->SquelchMailTo($address); } if($self->TicketObj->OwnerObj->Id != $RT::Nobody->id){ $self->TicketObj->AddWatcher( Type=>"AdminCc", PrincipalId=>$self->TicketObj->OwnerObj->Id ); } $self->TicketObj->UnsquelchMailTo($self->TicketObj->OwnerObj->EmailAddress); Custom action cleanup code: === It seems to work, in that when I look at the ticket, I see the ticket owner explicitly listed as AdminCc, but it does not seem to squelch the mail to the other AdminCcs (the default watcher group), so all the admins still get traffic on the ticket. If anyone has any thoughts, throw them my way. _______________________________________________ This is the CELS Sysadmins mailing list. It is sent to memebers of [email protected] and [email protected]. Do not subscribe directly to this list. Thanks.
Are these getting mail as CC or AdminCC? If AdminCC don't you need an additional squelch for those? ----- Original Message -----
From: "Craig Stacey" <[email protected]> To: "CELS Admins" <[email protected]> Sent: Monday, January 28, 2013 1:30:30 PM Subject: [CELS Sysadmins] RT Perl hacking
Okay fellow sysadmins. I've a puzzle I can't seem to solve, so I'll throw it up and see if anyone has any ideas. If you don't know or care about RT and/or Perl, you can just ignore this thread.
Trying to solve the problem below. It's not an urgent priority, and I don't really agree with the reasoning behind it, but in any case we've been asked to modify a user queue on the CI RT server such that:
When a ticket comes in unclaimed, mail should go to all admins. However, when the ticket is claimed then only the owner of the ticket gets any further mail.
I found what claims to be a solution to this, but I can't get the script working. This is on the CI RT instance (ie, no hacks to mail functions). Here's the config and script:
===
Condition: On Owner Change Action: User Defined Template: Blank Stage: TransactionCreate
Custom Condition:
Custom action preparation code:
foreach my $address($self->TicketObj->QueueObj->Cc->MemberEmailAddresses){ $self->TicketObj->SquelchMailTo($address); } if($self->TicketObj->OwnerObj->Id != $RT::Nobody->id){ $self->TicketObj->AddWatcher( Type=>"AdminCc", PrincipalId=>$self->TicketObj->OwnerObj->Id ); } $self->TicketObj->UnsquelchMailTo($self->TicketObj->OwnerObj->EmailAddress);
Custom action cleanup code:
===
It seems to work, in that when I look at the ticket, I see the ticket owner explicitly listed as AdminCc, but it does not seem to squelch the mail to the other AdminCcs (the default watcher group), so all the admins still get traffic on the ticket.
If anyone has any thoughts, throw them my way. _______________________________________________ This is the CELS Sysadmins mailing list. It is sent to memebers of [email protected] and [email protected].
Do not subscribe directly to this list. Thanks.
_______________________________________________ This is the CELS Sysadmins mailing list. It is sent to memebers of [email protected] and [email protected]. Do not subscribe directly to this list. Thanks.
Good call, I'll try that. ----- Original Message ----- From: "Dan Olson" <[email protected]> To: "Craig Stacey" <[email protected]> Cc: "CELS Admins" <[email protected]> Sent: Monday, January 28, 2013 2:23:53 PM Subject: Re: [CELS Sysadmins] RT Perl hacking Are these getting mail as CC or AdminCC? If AdminCC don't you need an additional squelch for those? ----- Original Message -----
From: "Craig Stacey" <[email protected]> To: "CELS Admins" <[email protected]> Sent: Monday, January 28, 2013 1:30:30 PM Subject: [CELS Sysadmins] RT Perl hacking
Okay fellow sysadmins. I've a puzzle I can't seem to solve, so I'll throw it up and see if anyone has any ideas. If you don't know or care about RT and/or Perl, you can just ignore this thread.
Trying to solve the problem below. It's not an urgent priority, and I don't really agree with the reasoning behind it, but in any case we've been asked to modify a user queue on the CI RT server such that:
When a ticket comes in unclaimed, mail should go to all admins. However, when the ticket is claimed then only the owner of the ticket gets any further mail.
I found what claims to be a solution to this, but I can't get the script working. This is on the CI RT instance (ie, no hacks to mail functions). Here's the config and script:
===
Condition: On Owner Change Action: User Defined Template: Blank Stage: TransactionCreate
Custom Condition:
Custom action preparation code:
foreach my $address($self->TicketObj->QueueObj->Cc->MemberEmailAddresses){ $self->TicketObj->SquelchMailTo($address); } if($self->TicketObj->OwnerObj->Id != $RT::Nobody->id){ $self->TicketObj->AddWatcher( Type=>"AdminCc", PrincipalId=>$self->TicketObj->OwnerObj->Id ); } $self->TicketObj->UnsquelchMailTo($self->TicketObj->OwnerObj->EmailAddress);
Custom action cleanup code:
===
It seems to work, in that when I look at the ticket, I see the ticket owner explicitly listed as AdminCc, but it does not seem to squelch the mail to the other AdminCcs (the default watcher group), so all the admins still get traffic on the ticket.
If anyone has any thoughts, throw them my way. _______________________________________________ This is the CELS Sysadmins mailing list. It is sent to memebers of [email protected] and [email protected].
Do not subscribe directly to this list. Thanks.
_______________________________________________ This is the CELS Sysadmins mailing list. It is sent to memebers of [email protected] and [email protected]. Do not subscribe directly to this list. Thanks.
Dan wins! ----- Original Message ----- From: "Craig Stacey" <[email protected]> To: "Dan Olson" <[email protected]> Cc: "CELS Admins" <[email protected]> Sent: Monday, January 28, 2013 2:24:46 PM Subject: Re: [CELS Sysadmins] RT Perl hacking Good call, I'll try that. ----- Original Message ----- From: "Dan Olson" <[email protected]> To: "Craig Stacey" <[email protected]> Cc: "CELS Admins" <[email protected]> Sent: Monday, January 28, 2013 2:23:53 PM Subject: Re: [CELS Sysadmins] RT Perl hacking Are these getting mail as CC or AdminCC? If AdminCC don't you need an additional squelch for those? ----- Original Message -----
From: "Craig Stacey" <[email protected]> To: "CELS Admins" <[email protected]> Sent: Monday, January 28, 2013 1:30:30 PM Subject: [CELS Sysadmins] RT Perl hacking
Okay fellow sysadmins. I've a puzzle I can't seem to solve, so I'll throw it up and see if anyone has any ideas. If you don't know or care about RT and/or Perl, you can just ignore this thread.
Trying to solve the problem below. It's not an urgent priority, and I don't really agree with the reasoning behind it, but in any case we've been asked to modify a user queue on the CI RT server such that:
When a ticket comes in unclaimed, mail should go to all admins. However, when the ticket is claimed then only the owner of the ticket gets any further mail.
I found what claims to be a solution to this, but I can't get the script working. This is on the CI RT instance (ie, no hacks to mail functions). Here's the config and script:
===
Condition: On Owner Change Action: User Defined Template: Blank Stage: TransactionCreate
Custom Condition:
Custom action preparation code:
foreach my $address($self->TicketObj->QueueObj->Cc->MemberEmailAddresses){ $self->TicketObj->SquelchMailTo($address); } if($self->TicketObj->OwnerObj->Id != $RT::Nobody->id){ $self->TicketObj->AddWatcher( Type=>"AdminCc", PrincipalId=>$self->TicketObj->OwnerObj->Id ); } $self->TicketObj->UnsquelchMailTo($self->TicketObj->OwnerObj->EmailAddress);
Custom action cleanup code:
===
It seems to work, in that when I look at the ticket, I see the ticket owner explicitly listed as AdminCc, but it does not seem to squelch the mail to the other AdminCcs (the default watcher group), so all the admins still get traffic on the ticket.
If anyone has any thoughts, throw them my way. _______________________________________________ This is the CELS Sysadmins mailing list. It is sent to memebers of [email protected] and [email protected].
Do not subscribe directly to this list. Thanks.
_______________________________________________ This is the CELS Sysadmins mailing list. It is sent to memebers of [email protected] and [email protected]. Do not subscribe directly to this list. Thanks.
participants (2)
-
Craig Stacey -
Dan Olson