On Tue, Jan 17, 2012 at 21:55, Todd French <[email protected]> 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: [email protected] [mailto:[email protected]] On Behalf Of 
> Ruslan Zakirov
> Sent: Saturday, January 14, 2012 2:41 PM
> To: Todd French
> Cc: [email protected]
> Subject: Re: [rt-users] Queue Notification Scrip question
>
> On Fri, Jan 13, 2012 at 23:39, Todd French <[email protected]> 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: [email protected] [mailto:[email protected]] On Behalf 
>> Of Ruslan Zakirov
>> Sent: Thursday, December 08, 2011 5:55 AM
>> To: Todd French
>> Cc: [email protected]
>> Subject: Re: [rt-users] Queue Notification Scrip question
>>
>> On Mon, Nov 21, 2011 at 11:54 PM, Todd French
>> <[email protected]> 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.
--------
RT Training Sessions (http://bestpractical.com/services/training.html)
* Boston  March 5 & 6, 2012

Reply via email to