Preventing notification on custom scrip action

I’ve written a custom scrip to change the owner to the first person that
replies to the ticket who has OwnTicket rights. Whenever this happens,
the new owner receives correspondence from RT with a content of “This
transaction appears to have no content” as a result of an “on owner
change notify owner” scrip.

How might I prevent that notification when it is the result of an auto
assignment?

– Scott McDermott
– Network & Systems Administrator
– King County Library System

Scott McDermott wrote:

I’ve written a custom scrip to change the owner to the first person that
replies to the ticket who has OwnTicket rights. Whenever this happens,
the new owner receives correspondence from RT with a content of “This
transaction appears to have no content” as a result of an “on owner
change notify owner” scrip.
You can adapt template for this scrip. You shouldn’t past
Transaction->Content into template cause it’s empty.

Read section “How to be silent” of
http://wiki.bestpractical.com/?WriteCustomAction

If this doesn’t help then post call that you use to change owner(can be
done in different ways) and I can suggest you how to avoid recording of
transaction.

How might I prevent that notification when it is the result of an auto
assignment?
As I said you can avoid transaction recording.

One of us misunderstands. The custom scrip is not generating the email
notification, it’s placing an entry in the history, which is fine. The
problem is the owner change notification scrip (which I think is
default) notifies the owner of the assignment, and I don’t want that in
this particular case. I do, however, want that email notification to
occur if someone goes in and assigns them ownership of a ticket.

– Scott McDermott
– Network & Systems Administrator
– King County Library SystemFrom: Ruslan U. Zakirov [mailto:cubic@acronis.ru]
Sent: Thursday, August 05, 2004 04:55
To: Scott McDermott
Cc: rt-users@lists.bestpractical.com
Subject: Re: [rt-users] Preventing notification on custom scrip action

Scott McDermott wrote:

I’ve written a custom scrip to change the owner to the first person
that
replies to the ticket who has OwnTicket rights. Whenever this happens,
the new owner receives correspondence from RT with a content of “This
transaction appears to have no content” as a result of an “on owner
change notify owner” scrip.
You can adapt template for this scrip. You shouldn’t past
Transaction->Content into template cause it’s empty.

Read section “How to be silent” of
http://wiki.bestpractical.com/?WriteCustomAction

If this doesn’t help then post call that you use to change owner(can be
done in different ways) and I can suggest you how to avoid recording of
transaction.

How might I prevent that notification when it is the result of an auto
assignment?
As I said you can avoid transaction recording.

I do understand you right.

Scott McDermott wrote:

One of us misunderstands. The custom scrip is not generating the email
notification, it’s placing an entry in the history, which is fine. The
Do you really need this note in history in this particular case? Don’t
write transaction, this is easiest way to go.

problem is the owner change notification scrip (which I think is
default) notifies the owner of the assignment, and I don’t want that in
this particular case. I do, however, want that email notification to
occur if someone goes in and assigns them ownership of a ticket.

I know only one difference between this transactions. It’s Creator
field. Creator of autoassignment is $RT::SystemUser, when somebody
changes ownership of the ticket then he is Creator of the Transaction.

Something like this code you can use in custom condition of notify
scrip(that notify about ownership changes):

if( $TransactionObj->CreatorObj->id == $RT::SystemUser->id ) {
… transaction in most cases was created by Scrip …
} else {
… some user created this …
}

Ah, I see. Thank you very much, I think that’ll solve the problem!

– Scott McDermott
– Network & Systems Administrator
– King County Library System-----Original Message-----
From: Ruslan U. Zakirov [mailto:cubic@acronis.ru]

I know only one difference between this transactions. It’s Creator
field. Creator of autoassignment is $RT::SystemUser, when somebody
changes ownership of the ticket then he is Creator of the Transaction.

Something like this code you can use in custom condition of notify
scrip(that notify about ownership changes):

if( $TransactionObj->CreatorObj->id == $RT::SystemUser->id ) {
… transaction in most cases was created by Scrip …
} else {
… some user created this …
}