Possible bug with Scrips? (RT 3.0.8)

Can someone else test this problem?

I have a scrip which sends a notification to the reqeustor
when a ticket is resolved. Nothing custome her, just built-in
scrip stuff.

There appears to be a bug in RT that causes no notification to
be sent under circumstances which I can’t figure out.

Here is an RT log that shows the requestor being notified when
the ticket is opened, but when the ticket is resolved shortly
after the scrip says: “No recipients found.”

Feb 3 13:53:46 slah001 RT: rt-3.0.8-169-3032.17.4462732396528@gedas.com #169/3032 - Scrip 2 (/opt/rt3/lib/RT/Action/SendEmail.pm:92)
Feb 3 13:53:46 slah001 RT: rt-3.0.8-169-3032.17.4462732396528@gedas.com sent To: chapmat@slah001.abh.vw.com Cc: Bcc: (/opt/rt3/lib/RT/Action/SendEmail.pm:302)
Feb 3 13:53:46 slah001 RT: rt-3.0.8-169-3032.16.41831253344@gedas.com #169/3032 - Scrip 3 (/opt/rt3/lib/RT/Action/SendEmail.pm:92)
Feb 3 13:53:46 slah001 RT: rt-3.0.8-169-3032.16.41831253344@gedas.com No recipients found. Not sending. (/opt/rt3/lib/RT/Action/SendEmail.pm:257)
Feb 3 13:53:46 slah001 RT: Ticket 169 created in queue ‘Test’ by chapmat (/opt/rt3/lib/RT/Ticket_Overlay.pm:636)
Feb 3 13:53:57 slah001 RT: rt-3.0.8-169-3034.1.33389187532003@gedas.com #169/3034 - Scrip 7 (/opt/rt3/lib/RT/Action/SendEmail.pm:92)
Feb 3 13:53:57 slah001 RT: rt-3.0.8-169-3034.1.33389187532003@gedas.com No recipients found. Not sending. (/opt/rt3/lib/RT/Action/SendEmail.pm:257)
Feb 3 13:53:57 slah001 RT: rt-3.0.8-169-3034.14.0875616167063@gedas.com #169/3034 - Scrip 8 (/opt/rt3/lib/RT/Action/SendEmail.pm:92)
Feb 3 13:53:57 slah001 RT: rt-3.0.8-169-3034.14.0875616167063@gedas.com No recipients found. Not sending. (/opt/rt3/lib/RT/Action/SendEmail.pm:257)
Feb 3 13:53:58 slah001 RT: rt-3.0.8-169-3035.13.9062053592137@gedas.com #169/3035 - Scrip 15 Notify Requestor on Resolve (/opt/rt3/lib/RT/Action/SendEmail.pm:92)
Feb 3 13:53:58 slah001 RT: rt-3.0.8-169-3035.13.9062053592137@gedas.com No recipients found. Not sending. (/opt/rt3/lib/RT/Action/SendEmail.pm:257)

This is weird. Anyone have any ideas?

Thanks!

-Todd

More details:

I added some logging info to SendEmail.pm:

#send the email

$RT::Logger->info(“Pre-weed To: " . join ( ‘,’, @{ $self->{‘To’} } ));
# Weed out any RT addresses. We really don’t want to talk to ourselves!
@{$self->{‘To’}} = RT::EmailParser::CullRTAddresses(”", @{$self->{‘To’}});

Here is the log output showing that the requestor is set in
$self->{‘To’} when the ticket is created, but not when the
ticket is resolved just seconds later.

07:14:42 RT: rt-3.0.8-175-3048.11.1630559483054@gedas.com #175/3048 - Scrip 2 (/opt/rt3/local/lib/RT/Action/SendEmail.pm:92)
07:14:42 RT: Pre-weed To: chapmat@slah001.abh.vw.com (/opt/rt3/local/lib/RT/Action/SendEmail.pm:95)
07:14:42 RT: To: chapmat@slah001.abh.vw.com (/opt/rt3/local/lib/RT/Action/SendEmail.pm:128)
07:14:42 RT: rt-3.0.8-175-3048.11.1630559483054@gedas.com sent To: chapmat@slah001.abh.vw.com Cc: Bcc: (/opt/rt3/local/lib/RT/Action/SendEmail.pm:304)

07:15:00 RT: rt-3.0.8-175-3049.9.13246137098447@gedas.com #175/3049 - Scrip 15 Notify Requestor on Resolve (/opt/rt3/local/lib/RT/Action/SendEmail.pm:92)
07:15:00 RT: Pre-weed To: (/opt/rt3/local/lib/RT/Action/SendEmail.pm:95)
07:15:00 RT: To: (/opt/rt3/local/lib/RT/Action/SendEmail.pm:128)
07:15:00 RT: rt-3.0.8-175-3049.9.13246137098447@gedas.com No recipients found. Not sending. (/opt/rt3/local/lib/RT/Action/SendEmail.pm:259)

This is very strange.

-ToddOn Tue, Feb 03, 2004 at 04:09:24PM -0500, Todd Chapman wrote:

Can someone else test this problem?

I have a scrip which sends a notification to the reqeustor
when a ticket is resolved. Nothing custome her, just built-in
scrip stuff.

There appears to be a bug in RT that causes no notification to
be sent under circumstances which I can’t figure out.

Here is an RT log that shows the requestor being notified when
the ticket is opened, but when the ticket is resolved shortly
after the scrip says: “No recipients found.”

Feb 3 13:53:46 slah001 RT: rt-3.0.8-169-3032.17.4462732396528@gedas.com #169/3032 - Scrip 2 (/opt/rt3/lib/RT/Action/SendEmail.pm:92)
Feb 3 13:53:46 slah001 RT: rt-3.0.8-169-3032.17.4462732396528@gedas.com sent To: chapmat@slah001.abh.vw.com Cc: Bcc: (/opt/rt3/lib/RT/Action/SendEmail.pm:302)
Feb 3 13:53:46 slah001 RT: rt-3.0.8-169-3032.16.41831253344@gedas.com #169/3032 - Scrip 3 (/opt/rt3/lib/RT/Action/SendEmail.pm:92)
Feb 3 13:53:46 slah001 RT: rt-3.0.8-169-3032.16.41831253344@gedas.com No recipients found. Not sending. (/opt/rt3/lib/RT/Action/SendEmail.pm:257)
Feb 3 13:53:46 slah001 RT: Ticket 169 created in queue ‘Test’ by chapmat (/opt/rt3/lib/RT/Ticket_Overlay.pm:636)
Feb 3 13:53:57 slah001 RT: rt-3.0.8-169-3034.1.33389187532003@gedas.com #169/3034 - Scrip 7 (/opt/rt3/lib/RT/Action/SendEmail.pm:92)
Feb 3 13:53:57 slah001 RT: rt-3.0.8-169-3034.1.33389187532003@gedas.com No recipients found. Not sending. (/opt/rt3/lib/RT/Action/SendEmail.pm:257)
Feb 3 13:53:57 slah001 RT: rt-3.0.8-169-3034.14.0875616167063@gedas.com #169/3034 - Scrip 8 (/opt/rt3/lib/RT/Action/SendEmail.pm:92)
Feb 3 13:53:57 slah001 RT: rt-3.0.8-169-3034.14.0875616167063@gedas.com No recipients found. Not sending. (/opt/rt3/lib/RT/Action/SendEmail.pm:257)
Feb 3 13:53:58 slah001 RT: rt-3.0.8-169-3035.13.9062053592137@gedas.com #169/3035 - Scrip 15 Notify Requestor on Resolve (/opt/rt3/lib/RT/Action/SendEmail.pm:92)
Feb 3 13:53:58 slah001 RT: rt-3.0.8-169-3035.13.9062053592137@gedas.com No recipients found. Not sending. (/opt/rt3/lib/RT/Action/SendEmail.pm:257)

This is weird. Anyone have any ideas?

Thanks!

-Todd


rt-users mailing list
rt-users@lists.bestpractical.com
The rt-users Archives

Have you read the FAQ? The RT FAQ Manager lives at http://fsck.com/rtfm

Am I talking to myself too much? :slight_smile:

It looks like a difference in Autoreply.pm and Notify.pm.

Autoreply.pm sets the ‘To’ differently than Notify.pm.

-ToddOn Wed, Feb 04, 2004 at 09:44:19AM -0500, Todd Chapman wrote:

More details:

I added some logging info to SendEmail.pm:

#send the email

$RT::Logger->info(“Pre-weed To: " . join ( ‘,’, @{ $self->{‘To’} } ));
# Weed out any RT addresses. We really don’t want to talk to ourselves!
@{$self->{‘To’}} = RT::EmailParser::CullRTAddresses(”", @{$self->{‘To’}});

Here is the log output showing that the requestor is set in
$self->{‘To’} when the ticket is created, but not when the
ticket is resolved just seconds later.

07:14:42 RT: rt-3.0.8-175-3048.11.1630559483054@gedas.com #175/3048 - Scrip 2 (/opt/rt3/local/lib/RT/Action/SendEmail.pm:92)
07:14:42 RT: Pre-weed To: chapmat@slah001.abh.vw.com (/opt/rt3/local/lib/RT/Action/SendEmail.pm:95)
07:14:42 RT: To: chapmat@slah001.abh.vw.com (/opt/rt3/local/lib/RT/Action/SendEmail.pm:128)
07:14:42 RT: rt-3.0.8-175-3048.11.1630559483054@gedas.com sent To: chapmat@slah001.abh.vw.com Cc: Bcc: (/opt/rt3/local/lib/RT/Action/SendEmail.pm:304)

07:15:00 RT: rt-3.0.8-175-3049.9.13246137098447@gedas.com #175/3049 - Scrip 15 Notify Requestor on Resolve (/opt/rt3/local/lib/RT/Action/SendEmail.pm:92)
07:15:00 RT: Pre-weed To: (/opt/rt3/local/lib/RT/Action/SendEmail.pm:95)
07:15:00 RT: To: (/opt/rt3/local/lib/RT/Action/SendEmail.pm:128)
07:15:00 RT: rt-3.0.8-175-3049.9.13246137098447@gedas.com No recipients found. Not sending. (/opt/rt3/local/lib/RT/Action/SendEmail.pm:259)

This is very strange.

-Todd

There appears to be a bug in RT that causes no notification to
be sent under circumstances which I can’t figure out.

are you getting bitten by rt’s default behavior of not sending email
to the person intiating the change? (which is now a config setting)

seph

It’s not a bug, it’s a feature.

The ‘Notify’ action doesn’t send an e-mail to the person
who triggered the action. Since I was the requestor on the
ticket and the resolver, my e-mail address was being stripped
out and there were no recpients to send to.

It was a good exercise though. I learned a lot more about
RT’s internals.

-ToddOn Wed, Feb 04, 2004 at 10:12:09AM -0500, Todd Chapman wrote:

Am I talking to myself too much? :slight_smile:

It looks like a difference in Autoreply.pm and Notify.pm.

Autoreply.pm sets the ‘To’ differently than Notify.pm.

-Todd

Thanks Seph. I sure was!

By default RT doesn’t notify the person who performs an update, as they

already know what they’ve done. If you’d like to change this behaviour,

Set $NotifyActor to 1

Set($NotifyActor, 0);

-ToddOn Wed, Feb 04, 2004 at 11:03:24AM -0500, seph wrote:

There appears to be a bug in RT that causes no notification to
be sent under circumstances which I can’t figure out.

are you getting bitten by rt’s default behavior of not sending email
to the person intiating the change? (which is now a config setting)

seph