[rt-users] Queue Notification Scrip question
Todd French
TFrench at theprivatebank.com
Tue Jan 24 15:02:37 EST 2012
I'm still having trouble with this, and I feel like something with my logic is fundamentally flawed. With this:
> Description: On Queue Change, Notify AdminCC if not owned
> Condition: User Defined
> Action: Notify AdminCcs
> Template: Global Template: Queue Notification
> Stage: TransactionCreate
>
> Custom Condition:
> return 0 unless $self->TransactionObj->Type eq "Set";
> return 0 unless $self->TransactionObj->Field eq "Queue";
> return 1 unless $self->TicketObj->Owner != $RT::Nobody->id;
If I change the last line in my condition to:
return 0 unless $self->TicketObj->Owner != $RT::Nobody->id;
it still triggers and sends the email, even if I have a ticket move from one queue to another both while owned by nobody in particular, and while being owned, but not changing ownership. This tells me that I'm not doing something right at all, and that I don't know enough yet as to know why.
-----Original Message-----
From: Todd French
Sent: Tuesday, January 17, 2012 12:33 PM
To: 'Ruslan Zakirov'
Cc: rt-users at lists.bestpractical.com
Subject: RE: [rt-users] Queue Notification Scrip question
In the current setup all privileged users have the ability to own tickets in all queues, but even if the ticket is owned prior to the queue change transaction, it's still firing off the email, when it's only supposed to if not owned.
-----Original Message-----
From: ruslan.zakirov at gmail.com [mailto:ruslan.zakirov at gmail.com] On Behalf Of Ruslan Zakirov
Sent: Tuesday, January 17, 2012 12:17 PM
To: Todd French
Cc: rt-users at lists.bestpractical.com
Subject: Re: [rt-users] Queue Notification Scrip question
On Tue, Jan 17, 2012 at 21:55, Todd French <TFrench at theprivatebank.com> wrote:
> Ruslan,
>
> Yes, as follows:
> Description: On Queue Change, Notify AdminCC if not owned
> Condition: User Defined
> Action: Notify AdminCcs
> Template: Global Template: Queue Notification
> Stage: TransactionCreate
>
> Custom Condition:
> return 0 unless $self->TransactionObj->Type eq "Set";
> return 0 unless $self->TransactionObj->Field eq "Queue";
> return 1 unless $self->TicketObj->Owner != $RT::Nobody->id;
>
> With this current code, it sends out a notification regardless of whether the ticket was owned or not when it changes queue. I'm starting to wonder if this isn't because the ticket is being untaken or assigned at the same time that it changes queue (usually).
Owner is changed to nobody if the current owner has now rights to own
tickets in new queue.
>
>
> Todd French | Information Technology
> Help Desk Administrator
>
> THE PRIVATEBANK
> 70 West Madison Street
> Chicago, Illinois 60602
> Help Desk: (312).564.1146
> p: (312).564.6968
>
>
> -----Original Message-----
> From: ruslan.zakirov at gmail.com [mailto:ruslan.zakirov at gmail.com] On Behalf Of Ruslan Zakirov
> Sent: Saturday, January 14, 2012 2:41 PM
> To: Todd French
> Cc: rt-users at lists.bestpractical.com
> Subject: Re: [rt-users] Queue Notification Scrip question
>
> On Fri, Jan 13, 2012 at 23:39, Todd French <TFrench at theprivatebank.com> wrote:
>> Ruslan,
>>
>> This reply is really late, but I've finally been slotted the time to work on this again. I'm trying to do as you say with the following Custom Condition:
>>
>> return 0 unless $self->TransactionObj->Type eq "Set";
>> return 0 unless $self->TransactionObj->Field eq "Queue";
>> return 1 unless $self->TicketObj->Owner != $RT::Nobody->id;
>>
>> But it is not working properly. It does send an email on queue change, but it does it regardless if the owner is set to "nobody in particular" or assigned to a user. I assume I am missing something here.
>>
>
> Have you selected 'User Defined' condition? Otherwise code looks good.
>
>>
>>
>> -----Original Message-----
>> From: ruslan.zakirov at gmail.com [mailto:ruslan.zakirov at gmail.com] On Behalf Of Ruslan Zakirov
>> Sent: Thursday, December 08, 2011 5:55 AM
>> To: Todd French
>> Cc: rt-users at lists.bestpractical.com
>> Subject: Re: [rt-users] Queue Notification Scrip question
>>
>> On Mon, Nov 21, 2011 at 11:54 PM, Todd French
>> <TFrench at theprivatebank.com> wrote:
>>> I’m trying to tidy up the notifications our users get on RT, currently we
>>> have in place a scrip that On Queue Change, Notify Admin CC’s. What I’d
>>> like to do is tweak this so that it only sends the notification for tickets
>>> that change when the owner is nobody, as we also have set a notification
>>> when the owner changes. This way we’re only broadcasting to all AdminCC’s
>>> when there’s something to go take ownership of, not something that is
>>> already owned.
>>>
>>>
>>>
>>> I’ve tried using a custom condition such as:
>>>
>>> return 1 unless $self->TicketObj->Owner != $RT::Nobody->id;
>>>
>>> but I was unsure on how to replicate the usual Notify AdminCC’s action.
>>
>> You don't need to replicate Notify action. You need custom condition
>> and replicate On Queue Change condition what is really simple.
>>
>> --
>> Best regards, Ruslan.
>>
>> ________________________________
>>
>> The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and privileged material. Unauthorized review, use, disclosure, or distribution is prohibited. If you receive this material/information in error, please contact the sender and destroy the material/information.
>>
>> Email is not a secure form of communication and should not be used to transmit personal or confidential information such as account numbers, balance information, or wire transfer requests. The PrivateBank is not responsible for the security of sensitive information received by email.
>
>
>
> --
> Best regards, Ruslan.
>
> ________________________________
>
> The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and privileged material. Unauthorized review, use, disclosure, or distribution is prohibited. If you receive this material/information in error, please contact the sender and destroy the material/information.
>
> Email is not a secure form of communication and should not be used to transmit personal or confidential information such as account numbers, balance information, or wire transfer requests. The PrivateBank is not responsible for the security of sensitive information received by email.
--
Best regards, Ruslan.
________________________________
The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and privileged material. Unauthorized review, use, disclosure, or distribution is prohibited. If you receive this material/information in error, please contact the sender and destroy the material/information.
Email is not a secure form of communication and should not be used to transmit personal or confidential information such as account numbers, balance information, or wire transfer requests. The PrivateBank is not responsible for the security of sensitive information received by email.
More information about the rt-users
mailing list