[rt-users] Queue Notification Scrip question
Kevin Falcone
falcone at bestpractical.com
Tue Jan 17 15:41:03 EST 2012
On Tue, Jan 17, 2012 at 06:33:07PM +0000, Todd French wrote:
> 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.
Add in RT->Logger->error("Type ".$self->TransactionObj->Type); and
similar lines for each value and find out what the current values
actually are.
-kevin
> -----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.
> --------
> RT Training Sessions (http://bestpractical.com/services/training.html)
> * Boston March 5 & 6, 2012
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20120117/9eeb7c6d/attachment.sig>
More information about the rt-users
mailing list