Behavior of ticket's AdminCC vs. queue's AdminCC

I want each member of the sysadmin group to be emailed when a ticket
comes into the ‘helpdesk’ with no owner (i.e. from the mail gateway, or
from the web gateway with no owner set). To accomplish this, I added a
scrip to ‘helpdesk’ called “NotifyOfNewTicketIfUnowned” that has the
custom condition:

if (($self->TransactionObj->Type eq “Create”) and
($self->TicketObj->OwnerObj->Id == $RT::Nobody->Id)) {
return(1);
} else {
return(undef);
}

and if true, the action is set to Notify AdminCCs. All of that works well.

However, if I have a ticket, and I am the owner, and I want to add a
comment to myself, I choose Comment, but that comment goes to the entire
staff. Or, related to this, if I want to add one other team member as
an AdminCC to this particular ticket because I need his input, I add him
to that ticket’s AdminCC field, and then I Comment on the ticket. And
this Comment goes to the entire sysadmin group. It seems the queue’s
AdminCC trumps the ticket’s AdminCC in all cases.

How do I accomplish both of my goals? I want both the initial broadcast
to all sysadmins when an unowned ticket comes in, AND the ability to
have an individual AdminCC list per ticket (or no AdminCCs at all for
that particular ticket, so that I can Comment to just myself).

Fran Fabrizio
Senior Systems Analyst
Department of Computer and Information Sciences
University of Alabama at Birmingham

205.934.0653

Hi Fran,

Your scrip doesn’t have anything to do with your issue.

It seems to me that you want the queue AdminCc list to be disregarded if
someone is added to the ticket’s AdminCc list. I don’t think that’s the
way RT works. I’m pretty sure that RT combines any ticket AdminCcs with
the queue AdminCcs when it sends e-mail. I don’t think you can override
the queue AdminCc list with a ticket AdminCc. But I might be wrong.

It should be pretty easy to do this, however, using Notify Other Recipients
with a custom template.

Regards,
Gene

At 12:49 PM 8/28/2007, Fran Fabrizio wrote:

I want each member of the sysadmin group to be emailed when a ticket
comes into the ‘helpdesk’ with no owner (i.e. from the mail gateway, or
from the web gateway with no owner set). To accomplish this, I added a
scrip to ‘helpdesk’ called “NotifyOfNewTicketIfUnowned” that has the
custom condition:

if (($self->TransactionObj->Type eq “Create”) and
($self->TicketObj->OwnerObj->Id == $RT::Nobody->Id)) {
return(1);
} else {
return(undef);
}

and if true, the action is set to Notify AdminCCs. All of that works well.

However, if I have a ticket, and I am the owner, and I want to add a
comment to myself, I choose Comment, but that comment goes to the entire
staff. Or, related to this, if I want to add one other team member as
an AdminCC to this particular ticket because I need his input, I add him
to that ticket’s AdminCC field, and then I Comment on the ticket. And
this Comment goes to the entire sysadmin group. It seems the queue’s
AdminCC trumps the ticket’s AdminCC in all cases.

How do I accomplish both of my goals? I want both the initial broadcast
to all sysadmins when an unowned ticket comes in, AND the ability to
have an individual AdminCC list per ticket (or no AdminCCs at all for
that particular ticket, so that I can Comment to just myself).


Fran Fabrizio
Senior Systems Analyst
Department of Computer and Information Sciences
University of Alabama at Birmingham
http://www.cis.uab.edu/
205.934.0653


The rt-users Archives

Community help: http://wiki.bestpractical.com
Commercial support: sales@bestpractical.com

Discover RT’s hidden secrets with RT Essentials from O’Reilly Media.
Buy a copy at http://rtbook.bestpractical.com

Gene LeDuc, GSEC
Security Analyst
San Diego State University

It seems to me that you want the queue AdminCc list to be disregarded
if someone is added to the ticket’s AdminCc list. I don’t think
that’s the way RT works. I’m pretty sure that RT combines any ticket
AdminCcs with the queue AdminCcs when it sends e-mail. I don’t think
you can override the queue AdminCc list with a ticket AdminCc. But I
might be wrong.
I believe that you are correct, and that is indeed the cause of my
problem. I just am a little unclear how to solve it. :slight_smile:
It should be pretty easy to do this, however, using Notify Other
Recipients with a custom template.
My real problem is this…

Goal: Have every member of the sysadmin group get a copy of an email
when a ticket comes in with no owner.
Overkill Solution: Add sysadmin as an AdminCC for the queue and do a On
Create Notify AdminCCs as Comment.

While that works it has the unpleasant side effects I previously
described. What I think I really wanted was:

Lighter Solution: Define an On Create scrip called NotifySysadmins
whose action is a user defined one that notifies everyone in the
sysadmin group with the existing Admin Comment template.

So I guess (sorry for thinking out loud here) what I need to know is how
to define an On Create scrip which calls a custom action that notifies
sysadmin. I couldn’t quite figure that out, so my hack was to make
sysadmin an AdminCC, since we already have a Notify AdminCCs as Comment
action.

I’m off to RTFM and figure out how to define a Notify sysadmin group as
Comment action, but if anyone knows this off the top of their head, I’d
be very thankful. :slight_smile:

Fran Fabrizio
Senior Systems Analyst
Department of Computer and Information Sciences
University of Alabama at Birmingham

205.934.0653

Fran Fabrizio wrote:

My real problem is this…

Goal: Have every member of the sysadmin group get a copy of an email
when a ticket comes in with no owner.
Overkill Solution: Add sysadmin as an AdminCC for the queue and do a On
Create Notify AdminCCs as Comment.

Just create a script:

Condition: On create
Action: Notify Other Recipients
Template:

And for the aforementioned template:

begin

anything you type here will end up in the email before the ticket
{$Transaction->Content()}

end

If you want to manage the group of sysadmins in RT and not as an email
list/alias, last week there was a thread - ‘Seeking notification method
advice’ - that I think will have what you want in there. As for the ‘no
owner’ part, you could create a custom action that checks if there is an
owner or not (and that the transaction type is create…), though you
might have to run it in the transactionBatch mode…

.r’

Hi Fran,

Here’s how I’d attack your problem.

  1. Change your On Create scrip to Notify Other Recipients and then create
    a custom template (NotifySysadmins for instance).

  2. Create an RT group called SysAdmins.

  3. Have your NotifySysadmins template send the notification e-mail to the
    RT SysAdmins group. Something like this:
    To: {
    my $group = RT::Group->new( $RT::SystemUser );
    $group->LoadUserDefinedGroup(“SysAdmins”);
    $OUT = $group->MemberEmailAddressesAsString; }

{ $Transaction->Content() }

This way your SysAdmins only get unowned new-ticket notifications, not all
the other noise.

Regards,
Gene

At 02:18 PM 8/28/2007, Fran Fabrizio wrote:

It seems to me that you want the queue AdminCc list to be disregarded
if someone is added to the ticket’s AdminCc list. I don’t think
that’s the way RT works. I’m pretty sure that RT combines any ticket
AdminCcs with the queue AdminCcs when it sends e-mail. I don’t think
you can override the queue AdminCc list with a ticket AdminCc. But I
might be wrong.
I believe that you are correct, and that is indeed the cause of my
problem. I just am a little unclear how to solve it. :slight_smile:
It should be pretty easy to do this, however, using Notify Other
Recipients with a custom template.
My real problem is this…

Goal: Have every member of the sysadmin group get a copy of an email
when a ticket comes in with no owner.
Overkill Solution: Add sysadmin as an AdminCC for the queue and do a On
Create Notify AdminCCs as Comment.

While that works it has the unpleasant side effects I previously
described. What I think I really wanted was:

Lighter Solution: Define an On Create scrip called NotifySysadmins
whose action is a user defined one that notifies everyone in the
sysadmin group with the existing Admin Comment template.

So I guess (sorry for thinking out loud here) what I need to know is how
to define an On Create scrip which calls a custom action that notifies
sysadmin. I couldn’t quite figure that out, so my hack was to make
sysadmin an AdminCC, since we already have a Notify AdminCCs as Comment
action.

I’m off to RTFM and figure out how to define a Notify sysadmin group as
Comment action, but if anyone knows this off the top of their head, I’d
be very thankful. :slight_smile:


Fran Fabrizio
Senior Systems Analyst
Department of Computer and Information Sciences
University of Alabama at Birmingham
http://www.cis.uab.edu/
205.934.0653

Gene LeDuc, GSEC
Security Analyst
San Diego State University

  1. Have your NotifySysadmins template send the notification e-mail
    to the RT SysAdmins group. Something like this:
    To: {
    my $group = RT::Group->new( $RT::SystemUser );
    $group->LoadUserDefinedGroup(“SysAdmins”);
    $OUT = $group->MemberEmailAddressesAsString; }

Ah, this was the key piece of the RT API I hadn’t grokked yet.
Perfect. Thanks!!