Problem with OnQueueChange scrip

I’ve created my template under Global. I’ve also set under Global the scrip with:
Condition: On Queue Change
Action: Notify Requestors
Template: Global template: MoveToCCEng
Stage: TransactionCreate

I need this to fire off only when a ticket is moved to the CCEng queue. I’m
guessing that I need a Custom Condition which will check that the queue is
actually the one in question. However, I don’t think I know what I should be
making it look like.

Perhaps
if (($self->TransactionObj->Type eq “Queue”) and
($self->TransactionObj->NewValue eq “CCEng”)) {
return 1;
}else{
return undef;
}
is what I’m looking for? But that doesn’t work either.

Can someone shed some light please?

Thanks,
Mathew
Keep up with me and what I’m up to: http://theillien.blogspot.com

You don’t want $self->TransactionObj->Type eq “Queue” because Type can’t be
set to Queue.

You want $self->TransactionObj->Type eq “Set”
& $self->TransactionObj->Field eq “Queue”

and that should work, i think.

fOn 7/31/07, Mathew Snyder theillien@yahoo.com wrote:

I’ve created my template under Global. I’ve also set under Global the
scrip with:
Condition: On Queue Change
Action: Notify Requestors
Template: Global template: MoveToCCEng
Stage: TransactionCreate

I need this to fire off only when a ticket is moved to the CCEng
queue. I’m
guessing that I need a Custom Condition which will check that the queue is
actually the one in question. However, I don’t think I know what I should
be
making it look like.

Perhaps
if (($self->TransactionObj->Type eq “Queue”) and
($self->TransactionObj->NewValue eq “CCEng”)) {
return 1;
}else{
return undef;
}
is what I’m looking for? But that doesn’t work either.

Can someone shed some light please?

Thanks,
Mathew

Keep up with me and what I’m up to: http://theillien.blogspot.com


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

How will that know which Queue a ticket is being moved to? Would I still use
the $self->TransactionObj->NewValue eq “CCEng” conditional?

Keep up with me and what I’m up to: http://theillien.blogspot.com

Forrest Blount wrote:

Hi Mathew;
1- What don’t you create a queue scrip/template instead of global one,
ie create you scrip with

Condition: On Queue Change
Action: Notify Requestors
Template: Global template: MoveToCCEng
Stage: TransactionCreate

in/on your CCEng Queue

2- If you have a defined Condition or/and action then the system wont
look in the custom boxes … if you want custom condition then change the
Condition to User Defined.same for Action etc …

Regards;
Roy

Mathew Snyder wrote:

I had actually tried the queue specific scrip but it wasn’t working so I changed
it to a global thinking that was the problem. That didn’t work either.

Keep up with me and what I’m up to: http://theillien.blogspot.com

Roy El-Hames wrote:

sorry-- yes,

$self->TransactionObj->NewValue eq “CCEng” looks good to me.

Mathew Snyder wrote:

At Tuesday 7/31/2007 11:56 AM, Mathew Snyder wrote:

I had actually tried the queue specific scrip but it wasn’t working
so I changed
it to a global thinking that was the problem. That didn’t work either.

Roy is right - you need a queue script on the CCEng queue with
condition “On Queue Change” .

Steve

I’ve already done that.

Keep up with me and what I’m up to: http://theillien.blogspot.com

Stephen Turner wrote:

Mathew;
Just apply the same you have there:

Condition: On Queue Change
Action: Notify Requestors
Template: Global template: MoveToCCEng
Stage: TransactionCreate

as a queue script on your CCEng queue and it should work, my guess is your template not working as a test a default template and see if it works …

Good luck ;
Roy

Mathew Snyder wrote:

I made the changes and used the Blank template. I still haven’t received
anything via mail.

Keep up with me and what I’m up to: http://theillien.blogspot.com

Roy El-Hames wrote:

At Tuesday 7/31/2007 01:15 PM, Mathew Snyder wrote:

I made the changes and used the Blank template. I still haven’t received
anything via mail.

The Blank template doesn’t send mail - in fact that’s why it’s there,
so you can have a scrip that doesn’t send mail. Try the Transaction template.

Steve

Stephen Turner wrote:

At Tuesday 7/31/2007 01:15 PM, Mathew Snyder wrote:

I made the changes and used the Blank template. I still haven’t received
anything via mail.

The Blank template doesn’t send mail - in fact that’s why it’s there, so
you can have a scrip that doesn’t send mail. Try the Transaction template.

Steve

I got it to work using the Admin Correspondence template when the NotifyActor
variable is set to ‘1’. However, as soon as I turn that off, no emails are sent
out.

Keep up with me and what I’m up to: http://theillien.blogspot.com

This tells you the problem is with your template, I usually have the
following 2 lines at the very top of the template:
RT-Attach-Message: Yes

Then leave 2 empty lines (you should do that) before adding any template
text.
If you are questioning NotifyActor, its a preferences if you want people
to receive notifications on what they just did then turn it off else
keep it off.
I typically test with a test user, so emails are fired to me(my rt user
account).

Best of luck;
Roy

Mathew Snyder wrote: