Fickle owner changes

In one of my queues, I have set up a scrip to send a template which is a form that needs printing. That part works fine, now it only sends the form to the new owner on owner change.

Here’s the catch. If owner A creates a ticket and sets it to nobody initially, then takes ownership once the necessary information is sent out, the scrip does not run and the form is not sent to them. However, if owner A sets it to nobody as before and completes it then sets it to owner B, owner B does receive the e-mail.

This tells me that the system does recognize the change in ownership from nobody to somebdy as a change.

Basically, if someone Takes a ticket, it isn’t classifying this as an owner change. If they assign it from unowned, it does. Why? Any thoughts on how to correct this behaviour?

I started looking into my issue and realized that part of the problem is I am creating a scrip to run off of OnOwnerChange when I should be making a custom condition.

This queue is used for purchasing. We get a request and fill out what information we are given. We then do the footwork and fill in the remaining fields after researching needs and costs. Once that is done I wanted to have a specific template sent to the owner to be printed out and handed off to the paper bureaucracy.

I had initially set it up so that once the information was inputted, the person working the ticket would assign themself ownership and receive the form to print in the e-mail. The system is not recognizing the owner change in certain situations.

What I would like to do now then is to have the template I have created be sent to the owner when a specific custom field is set from a null value to a string value.

Here is what I have so far from reading through related articles:

if (($self->TransactionObj->Type eq “CustomField”) and

($self->TransactionObj->Field eq “purch_vendor”) and

($self->TransactionObj->NewValue ne 0)) {

return(1);

} else {

return(undef);

}

Now one thing that I realized from reading up is that the Field eq “purch_vendor” will probably not work. I read that you need to specify the field’s ID. How do I call on that information?

Thanks-----Original Message-----
From: rt-users-bounces@lists.bestpractical.com [mailto:rt-users-bounces@lists.bestpractical.com]On Behalf Of Jonathan Godbeer
Sent: Saturday, February 04, 2006 1:37 PM
To: rt-users@lists.bestpractical.com
Subject: [rt-users] Fickle owner changes

In one of my queues, I have set up a scrip to send a template which is a form that needs printing. That part works fine, now it only sends the form to the new owner on owner change.

Here’s the catch. If owner A creates a ticket and sets it to nobody initially, then takes ownership once the necessary information is sent out, the scrip does not run and the form is not sent to them. However, if owner A sets it to nobody as before and completes it then sets it to owner B, owner B does receive the e-mail.

This tells me that the system does recognize the change in ownership from nobody to somebdy as a change.

Basically, if someone Takes a ticket, it isn’t classifying this as an owner change. If they assign it from unowned, it does. Why? Any thoughts on how to correct this behaviour?

Ok. Still looking for help on this one.

The problem is I need to have owner notification when a certain condition occurs. I even went so far as to make a new custom field called purch_send_form in my queue and make a custom condition stating that when the word “Send” is entered in that field, it will send the form (template to owner).

Here is that code:

if (($self->TransactionObj->Type eq “CustomField”) &&
($self->TransactionObj->NewValue eq “Send”)) {
return(1);
} else {
return(undef);
}

Again, nothing is happening when i take one of the tickets in my test instance and set that field. Any suggestions?

I’m not a heavy programmer, I am just trying to use this tool to improve our work flow. Any assistance would be greatly appreciated.-----Original Message-----
From: rt-users-bounces@lists.bestpractical.com [mailto:rt-users-bounces@lists.bestpractical.com]On Behalf Of Jonathan Godbeer
Sent: Monday, February 06, 2006 10:13 AM
To: rt-users@lists.bestpractical.com
Subject: RE: [rt-users] Fickle owner changes

I started looking into my issue and realized that part of the problem is I am creating a scrip to run off of OnOwnerChange when I should be making a custom condition.

This queue is used for purchasing. We get a request and fill out what information we are given. We then do the footwork and fill in the remaining fields after researching needs and costs. Once that is done I wanted to have a specific template sent to the owner to be printed out and handed off to the paper bureaucracy.

I had initially set it up so that once the information was inputted, the person working the ticket would assign themself ownership and receive the form to print in the e-mail. The system is not recognizing the owner change in certain situations.

What I would like to do now then is to have the template I have created be sent to the owner when a specific custom field is set from a null value to a string value.

Here is what I have so far from reading through related articles:

if (($self->TransactionObj->Type eq “CustomField”) and

($self->TransactionObj->Field eq “purch_vendor”) and

($self->TransactionObj->NewValue ne 0)) {

return(1);

} else {

return(undef);

}

Now one thing that I realized from reading up is that the Field eq “purch_vendor” will probably not work. I read that you need to specify the field’s ID. How do I call on that information?

Thanks

-----Original Message-----
From: rt-users-bounces@lists.bestpractical.com [mailto:rt-users-bounces@lists.bestpractical.com]On Behalf Of Jonathan Godbeer
Sent: Saturday, February 04, 2006 1:37 PM
To: rt-users@lists.bestpractical.com
Subject: [rt-users] Fickle owner changes

In one of my queues, I have set up a scrip to send a template which is a form that needs printing. That part works fine, now it only sends the form to the new owner on owner change.

Here’s the catch. If owner A creates a ticket and sets it to nobody initially, then takes ownership once the necessary information is sent out, the scrip does not run and the form is not sent to them. However, if owner A sets it to nobody as before and completes it then sets it to owner B, owner B does receive the e-mail.

This tells me that the system does recognize the change in ownership from nobody to somebdy as a change.

Basically, if someone Takes a ticket, it isn’t classifying this as an owner change. If they assign it from unowned, it does. Why? Any thoughts on how to correct this behaviour?

Here are some wiki entries on custom fields that may help you to write
your scrip/template:

http://wiki.bestpractical.com/index.cgi?AddCustomFieldstoTemplates
http://wiki.bestpractical.com/index.cgi?AddCustomFieldsValuesToMail

Basically, just search for “CustomField” (or some variation thereof) on
the BP wiki to see examples of what other people are trying to do.From: rt-users-bounces@lists.bestpractical.com
[mailto:rt-users-bounces@lists.bestpractical.com] On Behalf Of Jonathan
Godbeer
Sent: Thursday, February 09, 2006 8:56 AM
To: Jonathan Godbeer; rt-users@lists.bestpractical.com
Subject: RE: [rt-users] Fickle owner changes

Ok. Still looking for help on this one.
 
The problem is I need to have owner notification when a certain

condition occurs. I even went so far as to make a new custom field
called purch_send_form in my queue and make a custom condition stating
that when the word “Send” is entered in that field, it will send the
form (template to owner).

Here is that code:
 
if (($self->TransactionObj->Type eq "CustomField") &&
($self->TransactionObj->NewValue eq "Send")) {
return(1);
} else {
return(undef);
} 
 
Again, nothing is happening when i take one of the tickets in my

test instance and set that field. Any suggestions?

I'm not a heavy programmer, I am just trying to use this tool to

improve our work flow. Any assistance would be greatly appreciated.

I have that part complete. My template sends a form with information from the ticket. That works. It has been the process of establishing a condition to send it under that has been the hassle.

Initially I tried to send it on owner change, which works sometimes. The only time it doesnt work is when the original ticket requestor assigns the ticket to themself. This tends to be the case quite often, so in order to print out the form, we would have to have someone else assign the ticket we created to us…kind of awkward.

So I tried to change it once a specific field is filled in. In my own response I detailed the problem I am having with that. I was trying to check that a sepcific field was NOT null and it it wasnt, to send the form to the owner. No go.

Finally I made a whole seperate field to fill in with the word Send when you want the form to print. I thought I had the code right, as per what I had discovered from the mailing list archives, but it is not working at all. I do not receive an e-mail when I set that field.

So…thats where I am at.-----Original Message-----
From: Schultz, Eric [mailto:ESchultz@corp.untd.com]
Sent: Thursday, February 09, 2006 10:25 AM
To: Jonathan Godbeer; rt-users@lists.bestpractical.com
Subject: RE: [rt-users] Fickle owner changes

Here are some wiki entries on custom fields that may help you to write
your scrip/template:

http://wiki.bestpractical.com/index.cgi?AddCustomFieldstoTemplates
http://wiki.bestpractical.com/index.cgi?AddCustomFieldsValuesToMail

Basically, just search for “CustomField” (or some variation thereof) on
the BP wiki to see examples of what other people are trying to do.

From: rt-users-bounces@lists.bestpractical.com

[mailto:rt-users-bounces@lists.bestpractical.com] On Behalf Of Jonathan
Godbeer
Sent: Thursday, February 09, 2006 8:56 AM
To: Jonathan Godbeer; rt-users@lists.bestpractical.com
Subject: RE: [rt-users] Fickle owner changes

Ok. Still looking for help on this one.
 
The problem is I need to have owner notification when a certain

condition occurs. I even went so far as to make a new custom field
called purch_send_form in my queue and make a custom condition stating
that when the word “Send” is entered in that field, it will send the
form (template to owner).

Here is that code:
 
if (($self->TransactionObj->Type eq "CustomField") &&
($self->TransactionObj->NewValue eq "Send")) {
return(1);
} else {
return(undef);
} 
 
Again, nothing is happening when i take one of the tickets in my

test instance and set that field. Any suggestions?

I'm not a heavy programmer, I am just trying to use this tool to

improve our work flow. Any assistance would be greatly appreciated.

	-----Original Message-----
	From: rt-users-bounces@lists.bestpractical.com

[mailto:rt-users-bounces@lists.bestpractical.com]On Behalf Of Jonathan
Godbeer
Sent: Monday, February 06, 2006 10:13 AM
To: rt-users@lists.bestpractical.com
Subject: RE: [rt-users] Fickle owner changes

	I started looking into my issue and realized that part

of the problem is I am creating a scrip to run off of OnOwnerChange when
I should be making a custom condition.

	This queue is used for purchasing. We get a request and

fill out what information we are given. We then do the footwork and fill
in the remaining fields after researching needs and costs. Once that is
done I wanted to have a specific template sent to the owner to be
printed out and handed off to the paper bureaucracy.

	I had initially set it up so that once the information

was inputted, the person working the ticket would assign themself
ownership and receive the form to print in the e-mail. The system is not
recognizing the owner change in certain situations.

	What I would like to do now then is to have the template

I have created be sent to the owner when a specific custom field is set
from a null value to a string value.

	Here is what I have so far from reading through related

articles:

	if (($self->TransactionObj->Type eq "CustomField") and
	 
	($self->TransactionObj->Field eq "purch_vendor") and
	 
	($self->TransactionObj->NewValue ne 0)) {
	 
	return(1);
	 
	} else {
	 
	return(undef);
	 
	} 
	 
	Now one thing that I realized from reading up is that

the Field eq “purch_vendor” will probably not work. I read that you need
to specify the field’s ID. How do I call on that information?

	Thanks
	 
	 

		-----Original Message-----
		From: rt-users-bounces@lists.bestpractical.com

[mailto:rt-users-bounces@lists.bestpractical.com]On Behalf Of Jonathan
Godbeer
Sent: Saturday, February 04, 2006 1:37 PM
To: rt-users@lists.bestpractical.com
Subject: [rt-users] Fickle owner changes

		In one of my queues, I have set up a scrip to

send a template which is a form that needs printing. That part works
fine, now it only sends the form to the new owner on owner change.

		Here's the catch. If owner A creates a ticket

and sets it to nobody initially, then takes ownership once the necessary
information is sent out, the scrip does not run and the form is not sent
to them. However, if owner A sets it to nobody as before and completes
it then sets it to owner B, owner B does receive the e-mail.

		This tells me that the system does recognize the

change in ownership from nobody to somebdy as a change.

		Basically, if someone Takes a ticket, it isn't

classifying this as an owner change. If they assign it from unowned, it
does. Why? Any thoughts on how to correct this behaviour?

At Thursday 2/9/2006 03:02 PM, Jonathan Godbeer wrote:

I have that part complete. My template sends a form with information from
the ticket. That works. It has been the process of establishing a
condition to send it under that has been the hassle.

Initially I tried to send it on owner change, which works sometimes. The
only time it doesnt work is when the original ticket requestor assigns the
ticket to themself. This tends to be the case quite often, so in order to
print out the form, we would have to have someone else assign the ticket
we created to us…kind of awkward.

Jonathan,

I think you were on the right track with your first attempt, using the On
Owner Change condition. Bear in mind that if you have the config variable
NotifyActor set to 0, you will not get notified of your own updates - this
may be why the mail isn’t being sent to you when you take the ticket.

http://wiki.bestpractical.com/index.cgi?FAQ under Mailgate gives more info.
It implies that Autoreply actions WILL send mail regardless of the
NotifyActor setting, so perhaps if you could create an "Autoreply to Owner"
action, it would do what you want.

Steve

Does there still exist a statistics package somewhere
for RT2? I found info in the various FAQs pointing to
sites, but these are both dead:

http://users.ox.ac.uk/~simon/stats.tar.gz
http://www.tzi.de/~hollow/stats.tar.gz

Any current sites would be great.
Thanks!

Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

Well, after a bit more reading I managed to get into and edit the config file. NotifyActors was set to 0 and I changed it to 1. It still will not send after I take ownership.

Now since I changed the config file, will I need to restart RT for it to take effect? And if so, how do I go about that? Regrettably, I was not the one to set this system up and the one who did is gone =\

I’ll keep poking through the FAQ/Manual for an answer.

Thanks for the help thus far.From: Stephen Turner [mailto:sturner@MIT.EDU]
Sent: Thursday, February 09, 2006 1:15 PM
To: Jonathan Godbeer; Schultz, Eric; rt-users@lists.bestpractical.com
Subject: RE: [rt-users] Fickle owner changes

At Thursday 2/9/2006 03:02 PM, Jonathan Godbeer wrote:

I have that part complete. My template sends a form with information from
the ticket. That works. It has been the process of establishing a
condition to send it under that has been the hassle.

Initially I tried to send it on owner change, which works sometimes. The
only time it doesnt work is when the original ticket requestor assigns the
ticket to themself. This tends to be the case quite often, so in order to
print out the form, we would have to have someone else assign the ticket
we created to us…kind of awkward.

Jonathan,

I think you were on the right track with your first attempt, using the On
Owner Change condition. Bear in mind that if you have the config variable
NotifyActor set to 0, you will not get notified of your own updates - this
may be why the mail isn’t being sent to you when you take the ticket.

http://wiki.bestpractical.com/index.cgi?FAQ under Mailgate gives more info.
It implies that Autoreply actions WILL send mail regardless of the
NotifyActor setting, so perhaps if you could create an "Autoreply to Owner"
action, it would do what you want.

Steve

Usually

service httpd stop

rm -rf rt_dir/var/mason_data/*

service httpd start

Jonathan Godbeer wrote:

Well, after a bit more reading I managed to get into and edit the config file. NotifyActors was set to 0 and I changed it to 1. It still will not send after I take ownership.

Now since I changed the config file, will I need to restart RT for it to take effect? And if so, how do I go about that? Regrettably, I was not the one to set this system up and the one who did is gone =\

I’ll keep poking through the FAQ/Manual for an answer.

Thanks for the help thus far.

-----Original Message-----
From: Stephen Turner [mailto:sturner@MIT.EDU]
Sent: Thursday, February 09, 2006 1:15 PM
To: Jonathan Godbeer; Schultz, Eric; rt-users@lists.bestpractical.com
Subject: RE: [rt-users] Fickle owner changes

At Thursday 2/9/2006 03:02 PM, Jonathan Godbeer wrote:

I have that part complete. My template sends a form with information from
the ticket. That works. It has been the process of establishing a
condition to send it under that has been the hassle.

Initially I tried to send it on owner change, which works sometimes. The
only time it doesnt work is when the original ticket requestor assigns the
ticket to themself. This tends to be the case quite often, so in order to
print out the form, we would have to have someone else assign the ticket
we created to us…kind of awkward.

Jonathan,

I think you were on the right track with your first attempt, using the On
Owner Change condition. Bear in mind that if you have the config variable
NotifyActor set to 0, you will not get notified of your own updates - this
may be why the mail isn’t being sent to you when you take the ticket.

http://wiki.bestpractical.com/index.cgi?FAQ under Mailgate gives more info.
It implies that Autoreply actions WILL send mail regardless of the
NotifyActor setting, so perhaps if you could create an "Autoreply to Owner"
action, it would do what you want.

Steve


http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Be sure to check out the RT Wiki at http://wiki.bestpractical.com

Download a free sample chapter of RT Essentials from O’Reilly Media at http://rtbook.bestpractical.com

WE’RE COMING TO YOUR TOWN SOON - RT Training in Amsterdam, Boston and
San Francisco - Find out more at http://bestpractical.com/services/training.html

Drew Barnes
Applications Analyst
Raymond Walters College
University of Cincinnati

At Thursday 2/9/2006 03:57 PM, Jonathan Godbeer wrote:

Well, after a bit more reading I managed to get into and edit the config
file. NotifyActors was set to 0 and I changed it to 1. It still will not
send after I take ownership.

Now since I changed the config file, will I need to restart RT for it to
take effect? And if so, how do I go about that? Regrettably, I was not the
one to set this system up and the one who did is gone =\

Yes, you need to do separately stop and then start RT for config changes to
take effect . It’s typically done by stopping & starting the web server -

Steve