Custom Scrip problem

Thanks to everyone who replied to my last e-mail about custom scrips
Inquiry, it really helped. I am working with the RT Essentials
trying to get a butter understand of Templates and Scrips so I
followed the “Your ticket was stolen Example” but when someone steals
the ticket there is not an e-mail sent. Do you see anything I did
wrong?

Here is what I did.

Under root I did the following:

Configurations -> Global -> templates

Created the following template:

     $old_owner->Load( $Transaction->OldValue );
     $old_owner->EmailAddress() }

() }

A ticket you owned:

     { $Ticket->Subject() }

has been taken by {$Ticket->OwnerObj->Name()}.

{ $RT::WebURL }Ticket/Display.html?id={ $Ticket->Id }

Saved the template.

Then I went to Global -> Scrips -> New Scrips

Des: Ticket Stolen
Condition: User Defiened
Action: Notify Other Requestors ( I also tried Notified Owner)
Template: Global Template Ticket Steal
Stage: TransactionCreate
Custom condition:

my $trans = $self->TransactionObj; return 0 unless $trans->Field eq
’Owner’; return 1 if $trans->OldValue != RT::Nobody()->id(); return 0;

I am running the RT 3.4.1-2 version from Debian repo. Also the
bestpractical.com website is going slow.

Thanks for the help

-jb

I could have sworn that I couldn’t find it in the archives before. I
found the solutions. Thanks

-jbOn Mar 8, 2006, at 4:18 PM, Jason B. wrote:

Thanks to everyone who replied to my last e-mail about custom
scrips Inquiry, it really helped. I am working with the RT
Essentials trying to get a butter understand of Templates and
Scrips so I followed the “Your ticket was stolen Example” but when
someone steals the ticket there is not an e-mail sent. Do you see
anything I did wrong?

Here is what I did.

Under root I did the following:

Configurations -> Global -> templates

Created the following template:

To: { my $old_owner = RT::User->new( $self->CurrentUser );
$old_owner->Load( $Transaction->OldValue );
$old_owner->EmailAddress() }
Subject: Ticket #{ $Ticket->Id() } taken by { $Ticket->OwnerObj-

Name() }

A ticket you owned:

    { $Ticket->Subject() }

has been taken by {$Ticket->OwnerObj->Name()}.

{ $RT::WebURL }Ticket/Display.html?id={ $Ticket->Id }

Saved the template.

Then I went to Global -> Scrips -> New Scrips

Des: Ticket Stolen
Condition: User Defiened
Action: Notify Other Requestors ( I also tried Notified Owner)
Template: Global Template Ticket Steal
Stage: TransactionCreate
Custom condition:

my $trans = $self->TransactionObj; return 0 unless $trans->Field eq
’Owner’; return 1 if $trans->OldValue != RT::Nobody()->id(); return 0;

I am running the RT 3.4.1-2 version from Debian repo. Also the
bestpractical.com website is going slow.

Thanks for the help

-jb


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

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

We’re hiring! Come hack Perl for Best Practical: http://
bestpractical.com/about/jobs.html

JAson, to whom did you want the e_mail to go to and did you give that
role (like requestor) or group the “SeeOutgoingMail” priviledge? If not,
then you can have a hundred scrips that will go nowhere if no one has
the priviledge of seeing outgoing mail.

Kenn

Jason B. wrote:

Ken & others,

After going home and troubleshooting this more and looking at the
archive postings I noticed that some people got it working by
changing the Template to the following:To: {my $old_owner = RT::User->new($RT::System);
$old_owner->Load($Transaction->OldValue);
$old_owner->EmailAddress()}
Subject: Ticket #{$Ticket->Id()} taken by {$Ticket->OwnerObj->Name()}

A ticket you owned:

“{$Ticket->Subject()}”

has been taken by {$Ticket->OwnerObj->Name()}

{$RT::WebURL}Ticket/Display.html?id={$Ticket->Id()}

Basically changing the $RT::System part. It worked for others though
its not working for me. I do see that my Everyone Group does have
ShowOutgoingMail along with Every group that I have created that has
the ShowOutgoingMail. I noticed the following in the /var/log/messages

Mar 8 23:30:31 admin RT: Successful login for jbartels from
24.26.232.60 (/usr/share/request-tracker3.4/html/autohandler:197)
Mar 8 23:30:48 admin RT:
rt-3.4.1-2188-21627-2.19.1568452421506@something.com #2188/21627 -
Scrip 2 (/usr/share/request-tracker3.4/lib/RT/Action/SendEmail.pm:235)
Mar 8 23:30:48 admin RT:
<rt-3.4.1-2188-21627-2.19.1568452421506@something.com.> No recipients
found. Not sending. (/usr/share/request-tracker3.4/lib/RT/Action/
SendEmail.pm:247)
Mar 8 23:30:48 admin RT:
rt-3.4.1-2188-21627-15.13.6658577819274@something.com #2188/21627 -
Scrip 15 Ticket Stolen (/usr/share/request-tracker3.4/lib/RT/Action/
SendEmail.pm:235)
Mar 8 23:30:48 admin RT:
rt-3.4.1-2188-21627-15.13.6658577819274@something.com No recipients
found. Not sending. (/usr/share/request-tracker3.4/lib/RT/Action/
SendEmail.pm:247)

Okay so when I test it by pressing the Steal ticket it only works if
the root user has the ticket (just did it for testing) but if I use a
real user say jbartels and have jtest user steal it I do not receive
an e-mail and it shows that error message in the log file.

I want the e-mail sent to the user that use to have the ticket before
it was stolen. So it would go to jbartels if the jtest user stole
it. Not sure where I went wrong. I also searched the archives and
it said to try using the

Set($NotifyActor, 0);

Which doesn’t help anything.

Any thoughts?

-jason

Hello Everyone,

Its been about 2 weeks and I am still fighting with this problem.
Does anyone have any insight on what I might be doing wrong? Let me
tell you the changes I have made so far.

Here is the custom scrip:

Description: Ticket Stole
Condition: User defined
Action: Notify Owner
Template: Global Template Ticket Steal
Stage: Transaction Create

Custom Condition:

my $trans = $self->TransactionObj; return 0 unless $trans->Field eq
’Owner’; return 1 if $trans->OldValue != RT::Nobody()->id(); return 0;

Template 13: Ticket StealTo: {my $old_owner = RT::User->new($RT::System);
$old_owner->Load($Transaction->OldValue);
$old_owner->EmailAddress()}
Subject: Ticket #{$Ticket->Id()} taken by {$Ticket->OwnerObj->Name()}

A ticket you owned:

“{$Ticket->Subject()}”

has been taken by {$Ticket->OwnerObj->Name()}

{$RT::WebURL}Ticket/Display.html?id={$Ticket->Id()}

I am testing with a Queue called Support and with 2 users called
jason and mike.
Both of these guys are in a Group called Admin

Here are the permissions in the Admin group

AdminAllPersonalGroups
AdminCustomField
AdminGroup
AdminGroupMembership
AdminOwnPersonalGroups
AdminQueue
AdminUsers
AssignCustomFields
CommentOnTicket
CreateSavedSearch
CreateTicket
DelegateRights
DeleteTicket
EditSavedSearches
LoadSavedSearch
ModifyACL
ModifyCustomField
ModifyOwnMembership
ModifyQueueWatchers
ModifyScrips
ModifySelf
ModifyTemplate
ModifyTicket
OwnTicket
ReplyToTicket
SeeCustomField
SeeGroup
SeeQueue
ShowACL
ShowConfigTab
ShowOutgoingEmail
ShowSavedSearches
ShowScrips
ShowTemplate
ShowTicket
ShowTicketComments
StealTicket
SuperUser
TakeTicket
Watch
WatchAsAdminCc

For global User rights:
Jason has:
CommentOnTicket
CreateTicket
ModifyTicket
OwnTicket
ReplyToTicket
SeeQueue
ShowACL
ShowOutgoingEmail
ShowTicket
ShowTicketComments
StealTicket
TakeTicket
Watch

Mike has:
CommentOnTicket
CreateTicket
ModifyTicket
OwnTicket
ReplyToTicket
SeeQueue
ShowOutgoingEmail
ShowTicket
ShowTicketComments
StealTicket
TakeTicket

Okay so in the RT_SiteConfig.pm I have set:

Set($NotifyActor, 1);

Now when someone sends a ticket mike can take ownership of the
ticket. Next when Jason steals the ticket from Mike we do not get an
e-mail of the ticket stolen. In the syslogs it says:

Mar 24 10:47:28 admin RT:
rt-3.4.1-2886-28802-3.19.7923242290376@stabletransit.com
#2886/28802 - Scrip 3 (/usr/share/request-tracker3.4/lib/RT/Action/
SendEmail.pm:235)
Mar 24 10:47:28 admin RT:
rt-3.4.1-2886-28802-3.19.7923242290376@stabletransit.com No
recipients found. Not sending. (/usr/share/request-tracker3.4/lib/RT/
Action/SendEmail.pm:247)
Mar 24 10:47:28 admin RT:
rt-3.4.1-2886-28802-4.9.29499784638189@stabletransit.com
#2886/28802 - Scrip 4 (/usr/share/request-tracker3.4/lib/RT/Action/
SendEmail.pm:235)
Mar 24 10:47:28 admin RT:
rt-3.4.1-2886-28802-4.9.29499784638189@stabletransit.com No
recipients found. Not sending. (/usr/share/request-tracker3.4/lib/RT/
Action/SendEmail.pm:247)
Mar 24 10:47:28 admin RT:
rt-3.4.1-2886-28802-16.5.24126773829749@stabletransit.com
#2886/28802 - Scrip 16 On Create Notify Owner (/usr/share/request-
tracker3.4/lib/RT/Action/SendEmail.pm:235)
Mar 24 10:47:28 admin RT:
rt-3.4.1-2886-28802-16.5.24126773829749@stabletransit.com No
recipients found. Not sending. (/usr/share/request-tracker3.4/lib/RT/
Action/SendEmail.pm:247)

I am using RT 3.4.1-2 which is the debian packages for Sarge 3.1.
Anyone have any ideas why its not working? I have racked my brain
for the last 2 weeks. Hopefully i provided enough information.

-jason

Doesn’t that final return 0; always set it to 0 and therefore and never
send email?

Jason B. wrote:

Hello Everyone,

Its been about 2 weeks and I am still fighting with this problem.
Does anyone have any insight on what I might be doing wrong? Let me
tell you the changes I have made so far.

Here is the custom scrip:

Description: Ticket Stole
Condition: User defined
Action: Notify Owner
Template: Global Template Ticket Steal
Stage: Transaction Create

Custom Condition:

my $trans = $self->TransactionObj; return 0 unless $trans->Field eq
’Owner’; return 1 if $trans->OldValue != RT::Nobody()->id(); return 0;

Template 13: Ticket Steal

To: {my $old_owner = RT::User->new($RT::System);
$old_owner->Load($Transaction->OldValue);
$old_owner->EmailAddress()}
Subject: Ticket #{$Ticket->Id()} taken by {$Ticket->OwnerObj->Name()}

A ticket you owned:

“{$Ticket->Subject()}”

has been taken by {$Ticket->OwnerObj->Name()}

{$RT::WebURL}Ticket/Display.html?id={$Ticket->Id()}

I am testing with a Queue called Support and with 2 users called jason
and mike.
Both of these guys are in a Group called Admin

Here are the permissions in the Admin group

AdminAllPersonalGroups
AdminCustomField
AdminGroup
AdminGroupMembership
AdminOwnPersonalGroups
AdminQueue
AdminUsers
AssignCustomFields
CommentOnTicket
CreateSavedSearch
CreateTicket
DelegateRights
DeleteTicket
EditSavedSearches
LoadSavedSearch
ModifyACL
ModifyCustomField
ModifyOwnMembership
ModifyQueueWatchers
ModifyScrips
ModifySelf
ModifyTemplate
ModifyTicket
OwnTicket
ReplyToTicket
SeeCustomField
SeeGroup
SeeQueue
ShowACL
ShowConfigTab
ShowOutgoingEmail
ShowSavedSearches
ShowScrips
ShowTemplate
ShowTicket
ShowTicketComments
StealTicket
SuperUser
TakeTicket
Watch
WatchAsAdminCc

For global User rights:
Jason has:
CommentOnTicket
CreateTicket
ModifyTicket
OwnTicket
ReplyToTicket
SeeQueue
ShowACL
ShowOutgoingEmail
ShowTicket
ShowTicketComments
StealTicket
TakeTicket
Watch

Mike has:
CommentOnTicket
CreateTicket
ModifyTicket
OwnTicket
ReplyToTicket
SeeQueue
ShowOutgoingEmail
ShowTicket
ShowTicketComments
StealTicket
TakeTicket

Okay so in the RT_SiteConfig.pm I have set:

Set($NotifyActor, 1);

Now when someone sends a ticket mike can take ownership of the
ticket. Next when Jason steals the ticket from Mike we do not get an
e-mail of the ticket stolen. In the syslogs it says:

Mar 24 10:47:28 admin RT:
<rt-3.4.1-2886-28802-3.19.7923242290376@stabletransit.com
mailto:rt-3.4.1-2886-28802-3.19.7923242290376@stabletransit.com>
#2886/28802 - Scrip 3
(/usr/share/request-tracker3.4/lib/RT/Action/SendEmail.pm:235)
Mar 24 10:47:28 admin RT:
<rt-3.4.1-2886-28802-3.19.7923242290376@stabletransit.com
mailto:rt-3.4.1-2886-28802-3.19.7923242290376@stabletransit.com> No
recipients found. Not sending.
(/usr/share/request-tracker3.4/lib/RT/Action/SendEmail.pm:247)
Mar 24 10:47:28 admin RT:
<rt-3.4.1-2886-28802-4.9.29499784638189@stabletransit.com
mailto:rt-3.4.1-2886-28802-4.9.29499784638189@stabletransit.com>
#2886/28802 - Scrip 4
(/usr/share/request-tracker3.4/lib/RT/Action/SendEmail.pm:235)
Mar 24 10:47:28 admin RT:
<rt-3.4.1-2886-28802-4.9.29499784638189@stabletransit.com
mailto:rt-3.4.1-2886-28802-4.9.29499784638189@stabletransit.com> No
recipients found. Not sending.
(/usr/share/request-tracker3.4/lib/RT/Action/SendEmail.pm:247)
Mar 24 10:47:28 admin RT:
<rt-3.4.1-2886-28802-16.5.24126773829749@stabletransit.com
mailto:rt-3.4.1-2886-28802-16.5.24126773829749@stabletransit.com>
#2886/28802 - Scrip 16 On Create Notify Owner
(/usr/share/request-tracker3.4/lib/RT/Action/SendEmail.pm:235)
Mar 24 10:47:28 admin RT:
<rt-3.4.1-2886-28802-16.5.24126773829749@stabletransit.com
mailto:rt-3.4.1-2886-28802-16.5.24126773829749@stabletransit.com> No
recipients found. Not sending.
(/usr/share/request-tracker3.4/lib/RT/Action/SendEmail.pm:247)

I am using RT 3.4.1-2 which is the debian packages for Sarge 3.1.
Anyone have any ideas why its not working? I have racked my brain for
the last 2 weeks. Hopefully i provided enough information.

-jason

Ken & others,

After going home and troubleshooting this more and looking at the
archive postings I noticed that some people got it working by
changing the Template to the following:

To: {my $old_owner = RT::User->new($RT::System);
$old_owner->Load($Transaction->OldValue);
$old_owner->EmailAddress()}
Subject: Ticket #{$Ticket->Id()} taken by {$Ticket->OwnerObj->Name()}

A ticket you owned:

“{$Ticket->Subject()}”

has been taken by {$Ticket->OwnerObj->Name()}

{$RT::WebURL}Ticket/Display.html?id={$Ticket->Id()}

Basically changing the $RT::System part. It worked for others though
its not working for me. I do see that my Everyone Group does
have ShowOutgoingMail along with Every group that I have created that
has the ShowOutgoingMail. I noticed the following in the
/var/log/messages

Mar 8 23:30:31 admin RT: Successful login for jbartels from
24.26.232.60 (/usr/share/request-tracker3.4/html/autohandler:197)
Mar 8 23:30:48 admin RT:
<rt-3.4.1-2188-21627-2.19.1568452421506@something.com
mailto:rt-3.4.1-2188-21627-2.19.1568452421506@something.com>
#2188/21627 - Scrip 2
(/usr/share/request-tracker3.4/lib/RT/Action/SendEmail.pm:235)
Mar 8 23:30:48 admin RT:
<rt-3.4.1-2188-21627-2.19.1568452421506@something.com
mailto:rt-3.4.1-2188-21627-2.19.1568452421506@something.com.> No
recipients found. Not sending.
(/usr/share/request-tracker3.4/lib/RT/Action/SendEmail.pm:247)
Mar 8 23:30:48 admin RT:
<rt-3.4.1-2188-21627-15.13.6658577819274@something.com
mailto:rt-3.4.1-2188-21627-15.13.6658577819274@something.com>
#2188/21627 - Scrip 15 Ticket Stolen
(/usr/share/request-tracker3.4/lib/RT/Action/SendEmail.pm:235)
Mar 8 23:30:48 admin RT:
<rt-3.4.1-2188-21627-15.13.6658577819274@something.com
mailto:rt-3.4.1-2188-21627-15.13.6658577819274@something.com> No
recipients found. Not sending.
(/usr/share/request-tracker3.4/lib/RT/Action/SendEmail.pm:247)

Okay so when I test it by pressing the Steal ticket it only works if
the root user has the ticket (just did it for testing) but if I use a
real user say jbartels and have jtest user steal it I do not receive
an e-mail and it shows that error message in the log file.

I want the e-mail sent to the user that use to have the ticket before
it was stolen. So it would go to jbartels if the jtest user stole
it. Not sure where I went wrong. I also searched the archives and
it said to try using the

Set($NotifyActor, 0);

Which doesn’t help anything.

Any thoughts?

-jason

JAson, to whom did you want the e_mail to go to and did you give
that role (like requestor) or group the "SeeOutgoingMail"
priviledge? If not, then you can have a hundred scrips that will go
nowhere if no one has the priviledge of seeing outgoing mail.

Kenn



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

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

We’re hiring! Come hack Perl for Best Practical: http://bestpractical.com/about/jobs.html

Drew Barnes
Applications Analyst
Raymond Walters College
University of Cincinnati

Hello Drew,

I actually got this scrip from the RT Essentials book. I tried to
see if there were any errors with it on the O’Reilly page.

-jbOn Mar 24, 2006, at 11:53 AM, Drew Barnes wrote:

Doesn’t that final return 0; always set it to 0 and therefore and
never send email?

Jason B. wrote:

Hello Everyone,

Its been about 2 weeks and I am still fighting with this problem.
Does anyone have any insight on what I might be doing wrong? Let
me tell you the changes I have made so far.

Here is the custom scrip:

Description: Ticket Stole
Condition: User defined
Action: Notify Owner
Template: Global Template Ticket Steal
Stage: Transaction Create

Custom Condition:

my $trans = $self->TransactionObj; return 0 unless $trans->Field
eq ‘Owner’; return 1 if $trans->OldValue != RT::Nobody()->id();
return 0;

Template 13: Ticket Steal

To: {my $old_owner = RT::User->new($RT::System);
$old_owner->Load($Transaction->OldValue);
$old_owner->EmailAddress()}
Subject: Ticket #{$Ticket->Id()} taken by {$Ticket->OwnerObj->Name()}

A ticket you owned:

“{$Ticket->Subject()}”

has been taken by {$Ticket->OwnerObj->Name()}

{$RT::WebURL}Ticket/Display.html?id={$Ticket->Id()}

I am testing with a Queue called Support and with 2 users called
jason and mike.
Both of these guys are in a Group called Admin

Here are the permissions in the Admin group

AdminAllPersonalGroups
AdminCustomField
AdminGroup
AdminGroupMembership
AdminOwnPersonalGroups
AdminQueue
AdminUsers
AssignCustomFields
CommentOnTicket
CreateSavedSearch
CreateTicket
DelegateRights
DeleteTicket
EditSavedSearches
LoadSavedSearch
ModifyACL
ModifyCustomField
ModifyOwnMembership
ModifyQueueWatchers
ModifyScrips
ModifySelf
ModifyTemplate
ModifyTicket
OwnTicket
ReplyToTicket
SeeCustomField
SeeGroup
SeeQueue
ShowACL
ShowConfigTab
ShowOutgoingEmail
ShowSavedSearches
ShowScrips
ShowTemplate
ShowTicket
ShowTicketComments
StealTicket
SuperUser
TakeTicket
Watch
WatchAsAdminCc

For global User rights:
Jason has:
CommentOnTicket
CreateTicket
ModifyTicket
OwnTicket
ReplyToTicket
SeeQueue
ShowACL
ShowOutgoingEmail
ShowTicket
ShowTicketComments
StealTicket
TakeTicket
Watch

Mike has:
CommentOnTicket
CreateTicket
ModifyTicket
OwnTicket
ReplyToTicket
SeeQueue
ShowOutgoingEmail
ShowTicket
ShowTicketComments
StealTicket
TakeTicket

Okay so in the RT_SiteConfig.pm I have set:

Set($NotifyActor, 1);

Now when someone sends a ticket mike can take ownership of the
ticket. Next when Jason steals the ticket from Mike we do not get
an e-mail of the ticket stolen. In the syslogs it says:

Mar 24 10:47:28 admin RT:
<rt-3.4.1-2886-28802-3.19.7923242290376@stabletransit.com
mailto:rt-3.4.1-2886-28802-3.19.7923242290376@stabletransit.com>
#2886/28802 - Scrip 3 (/usr/share/request-tracker3.4/lib/RT/
Action/SendEmail.pm:235) Mar 24 10:47:28 admin RT:
<rt-3.4.1-2886-28802-3.19.7923242290376@stabletransit.com
mailto:rt-3.4.1-2886-28802-3.19.7923242290376@stabletransit.com>
No recipients found. Not sending. (/usr/share/request-tracker3.4/
lib/RT/Action/SendEmail.pm:247) Mar 24 10:47:28 admin RT:
<rt-3.4.1-2886-28802-4.9.29499784638189@stabletransit.com
mailto:rt-3.4.1-2886-28802-4.9.29499784638189@stabletransit.com>
#2886/28802 - Scrip 4 (/usr/share/request-tracker3.4/lib/RT/
Action/SendEmail.pm:235) Mar 24 10:47:28 admin RT:
<rt-3.4.1-2886-28802-4.9.29499784638189@stabletransit.com
mailto:rt-3.4.1-2886-28802-4.9.29499784638189@stabletransit.com>
No recipients found. Not sending. (/usr/share/request-tracker3.4/
lib/RT/Action/SendEmail.pm:247) Mar 24 10:47:28 admin RT:
<rt-3.4.1-2886-28802-16.5.24126773829749@stabletransit.com
mailto:rt-3.4.1-2886-28802-16.5.24126773829749@stabletransit.com> #
2886/28802 - Scrip 16 On Create Notify Owner (/usr/share/request-
tracker3.4/lib/RT/Action/SendEmail.pm:235) Mar 24 10:47:28 admin
RT: <rt-3.4.1-2886-28802-16.5.24126773829749@stabletransit.com
mailto:rt-3.4.1-2886-28802-16.5.24126773829749@stabletransit.com> N
o recipients found. Not sending. (/usr/share/request-tracker3.4/
lib/RT/Action/SendEmail.pm:247)

I am using RT 3.4.1-2 which is the debian packages for Sarge 3.1.
Anyone have any ideas why its not working? I have racked my brain
for the last 2 weeks. Hopefully i provided enough information.

-jason

On Mar 8, 2006, at 11:38 PM, Jason B. wrote:

Ken & others,

After going home and troubleshooting this more and looking at the
archive postings I noticed that some people got it working by
changing the Template to the following:

To: {my $old_owner = RT::User->new($RT::System);
$old_owner->Load($Transaction->OldValue);
$old_owner->EmailAddress()}
Subject: Ticket #{$Ticket->Id()} taken by {$Ticket->OwnerObj->Name
()}

A ticket you owned:

“{$Ticket->Subject()}”

has been taken by {$Ticket->OwnerObj->Name()}

{$RT::WebURL}Ticket/Display.html?id={$Ticket->Id()}

Basically changing the $RT::System part. It worked for others
though its not working for me. I do see that my Everyone Group
does have ShowOutgoingMail along with Every group that I have
created that has the ShowOutgoingMail. I noticed the following
in the /var/log/messages

Mar 8 23:30:31 admin RT: Successful login for jbartels from
24.26.232.60 (/usr/share/request-tracker3.4/html/autohandler:197)
Mar 8 23:30:48 admin RT:
<rt-3.4.1-2188-21627-2.19.1568452421506@something.com
mailto:rt-3.4.1-2188-21627-2.19.1568452421506@something.com>
#2188/21627 - Scrip 2 (/usr/share/request-tracker3.4/lib/RT/
Action/SendEmail.pm:235) Mar 8 23:30:48 admin RT:
<rt-3.4.1-2188-21627-2.19.1568452421506@something.com
mailto:rt-3.4.1-2188-21627-2.19.1568452421506@something.com.>
No recipients found. Not sending. (/usr/share/request-tracker3.4/
lib/RT/Action/SendEmail.pm:247) Mar 8 23:30:48 admin RT:
<rt-3.4.1-2188-21627-15.13.6658577819274@something.com
mailto:rt-3.4.1-2188-21627-15.13.6658577819274@something.com>
#2188/21627 - Scrip 15 Ticket Stolen (/usr/share/request-
tracker3.4/lib/RT/Action/SendEmail.pm:235) Mar 8 23:30:48 admin
RT: <rt-3.4.1-2188-21627-15.13.6658577819274@something.com
mailto:rt-3.4.1-2188-21627-15.13.6658577819274@something.com>
No recipients found. Not sending. (/usr/share/request-tracker3.4/
lib/RT/Action/SendEmail.pm:247)

Okay so when I test it by pressing the Steal ticket it only works
if the root user has the ticket (just did it for testing) but if
I use a real user say jbartels and have jtest user steal it I do
not receive an e-mail and it shows that error message in the log
file.

I want the e-mail sent to the user that use to have the ticket
before it was stolen. So it would go to jbartels if the jtest
user stole it. Not sure where I went wrong. I also searched the
archives and it said to try using the
Set($NotifyActor, 0);

Which doesn’t help anything.

Any thoughts?

-jason

On Mar 8, 2006, at 6:49 PM, Ken Crocker wrote:

JAson, to whom did you want the e_mail to go to and did you give
that role (like requestor) or group the "SeeOutgoingMail"
priviledge? If not, then you can have a hundred scrips that will
go nowhere if no one has the priviledge of seeing outgoing mail.

Kenn




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

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

We’re hiring! Come hack Perl for Best Practical: http://
bestpractical.com/about/jobs.html


Drew Barnes
Applications Analyst
Raymond Walters College
University of Cincinnati

Jason,

I'm curious. If your two uesrs are in a group that has all those 

rights, why did you even bother to give them global user rights? The
only global user right we give is superuser and that’s only to us
system admins. Once a user is in a group and that group has rights, man,
your done. If you create another Queue, then you can either allow that
group to have certain rights for that particular queue or not. It looks
to me like you dished out WAY too many rights, like a scatter-gun effect
and that’s makes it a lot tougher to debug any problem. Try trimming
some of that stuff off and make little changes, one at a time.

Kenn

Jason B. wrote:

Hello Kenn & Others,

I have changed the permissions for Mike & Jason. Here are the
current permissions on the Admin group:

Configuration -> Global-> Group Rights -> Admin

CommentOnTicket
CreateTicket
DeleteTicket
ModifyQueueWatchers
ModifyTicket
OwnTicket
ReplyToTicket
SeeCustomField
SeeQueue
ShowOutgoingEmail
ShowTicket
ShowTicketComments
StealTicket
TakeTicket

I removed all user groups for Jason & Mike since they are part of a
group. I am still getting the error:

Mar 24 10:47:28 admin RT:
rt-3.4.1-2886-28802-3.19.7923242290376@stabletransit.com
#2886/28802 - Scrip 3 (/usr/share/request-tracker3.4/lib/RT/
Action/SendEmail.pm:235)
Mar 24 10:47:28 admin RT:
rt-3.4.1-2886-28802-3.19.7923242290376@stabletransit.com No
recipients found. Not sending. (/usr/share/request-tracker3.4/lib/
RT/Action/SendEmail.pm:247)
Mar 24 10:47:28 admin RT:
rt-3.4.1-2886-28802-4.9.29499784638189@stabletransit.com
#2886/28802 - Scrip 4 (/usr/share/request-tracker3.4/lib/RT/
Action/SendEmail.pm:235)
Mar 24 10:47:28 admin RT:
rt-3.4.1-2886-28802-4.9.29499784638189@stabletransit.com No
recipients found. Not sending. (/usr/share/request-tracker3.4/lib/
RT/Action/SendEmail.pm:247)
Mar 24 10:47:28 admin RT:
rt-3.4.1-2886-28802-16.5.24126773829749@stabletransit.com
#2886/28802 - Scrip 16 On Create Notify Owner (/usr/share/request-
tracker3.4/lib/RT/Action/SendEmail.pm:235)
Mar 24 10:47:28 admin RT:
rt-3.4.1-2886-28802-16.5.24126773829749@stabletransit.com No
recipients found. Not sending. (/usr/share/request-tracker3.4/lib/
RT/Action/SendEmail.pm:247)

Any other idea’s?

-jbOn Mar 24, 2006, at 12:53 PM, Kenneth Crocker wrote:

Jason,

I'm curious. If your two uesrs are in a group that has all  

those rights, why did you even bother to give them global user
rights? The only global user right we give is superuser and that’s
only to us system admins. Once a user is in a group and that group
has rights, man, your done. If you create another Queue, then you
can either allow that group to have certain rights for that
particular queue or not. It looks to me like you dished out WAY too
many rights, like a scatter-gun effect and that’s makes it a lot
tougher to debug any problem. Try trimming some of that stuff off
and make little changes, one at a time.

Kenn

Jason B. wrote:

Hello Everyone,

Its been about 2 weeks and I am still fighting with this problem.
Does anyone have any insight on what I might be doing wrong? Let
me tell you the changes I have made so far.

Here is the custom scrip:

Description: Ticket Stole
Condition: User defined
Action: Notify Owner
Template: Global Template Ticket Steal
Stage: Transaction Create

Custom Condition:

my $trans = $self->TransactionObj; return 0 unless $trans->Field
eq ‘Owner’; return 1 if $trans->OldValue != RT::Nobody()->id();
return 0;

Template 13: Ticket Steal

To: {my $old_owner = RT::User->new($RT::System);
$old_owner->Load($Transaction->OldValue);
$old_owner->EmailAddress()}
Subject: Ticket #{$Ticket->Id()} taken by {$Ticket->OwnerObj->Name()}

A ticket you owned:

“{$Ticket->Subject()}”

has been taken by {$Ticket->OwnerObj->Name()}

{$RT::WebURL}Ticket/Display.html?id={$Ticket->Id()}

I am testing with a Queue called Support and with 2 users called
jason and mike.
Both of these guys are in a Group called Admin

Here are the permissions in the Admin group

AdminAllPersonalGroups
AdminCustomField
AdminGroup
AdminGroupMembership
AdminOwnPersonalGroups
AdminQueue
AdminUsers
AssignCustomFields
CommentOnTicket
CreateSavedSearch
CreateTicket
DelegateRights
DeleteTicket
EditSavedSearches
LoadSavedSearch
ModifyACL
ModifyCustomField
ModifyOwnMembership
ModifyQueueWatchers
ModifyScrips
ModifySelf
ModifyTemplate
ModifyTicket
OwnTicket
ReplyToTicket
SeeCustomField
SeeGroup
SeeQueue
ShowACL
ShowConfigTab
ShowOutgoingEmail
ShowSavedSearches
ShowScrips
ShowTemplate
ShowTicket
ShowTicketComments
StealTicket
SuperUser
TakeTicket
Watch
WatchAsAdminCc

For global User rights:
Jason has:
CommentOnTicket
CreateTicket
ModifyTicket
OwnTicket
ReplyToTicket
SeeQueue
ShowACL
ShowOutgoingEmail
ShowTicket
ShowTicketComments
StealTicket
TakeTicket
Watch

Mike has:
CommentOnTicket
CreateTicket
ModifyTicket
OwnTicket
ReplyToTicket
SeeQueue
ShowOutgoingEmail
ShowTicket
ShowTicketComments
StealTicket
TakeTicket

Okay so in the RT_SiteConfig.pm I have set:

Set($NotifyActor, 1);

Now when someone sends a ticket mike can take ownership of the
ticket. Next when Jason steals the ticket from Mike we do not get
an e-mail of the ticket stolen. In the syslogs it says:

Mar 24 10:47:28 admin RT:
rt-3.4.1-2886-28802-3.19.7923242290376@stabletransit.com
#2886/28802 - Scrip 3 (/usr/share/request-tracker3.4/lib/RT/
Action/SendEmail.pm:235)
Mar 24 10:47:28 admin RT:
rt-3.4.1-2886-28802-3.19.7923242290376@stabletransit.com No
recipients found. Not sending. (/usr/share/request-tracker3.4/lib/
RT/Action/SendEmail.pm:247)
Mar 24 10:47:28 admin RT:
rt-3.4.1-2886-28802-4.9.29499784638189@stabletransit.com
#2886/28802 - Scrip 4 (/usr/share/request-tracker3.4/lib/RT/
Action/SendEmail.pm:235)
Mar 24 10:47:28 admin RT:
rt-3.4.1-2886-28802-4.9.29499784638189@stabletransit.com No
recipients found. Not sending. (/usr/share/request-tracker3.4/lib/
RT/Action/SendEmail.pm:247)
Mar 24 10:47:28 admin RT:
rt-3.4.1-2886-28802-16.5.24126773829749@stabletransit.com
#2886/28802 - Scrip 16 On Create Notify Owner (/usr/share/request-
tracker3.4/lib/RT/Action/SendEmail.pm:235)
Mar 24 10:47:28 admin RT:
rt-3.4.1-2886-28802-16.5.24126773829749@stabletransit.com No
recipients found. Not sending. (/usr/share/request-tracker3.4/lib/
RT/Action/SendEmail.pm:247)

I am using RT 3.4.1-2 which is the debian packages for Sarge 3.1.
Anyone have any ideas why its not working? I have racked my brain
for the last 2 weeks. Hopefully i provided enough information.

-jason

On Mar 8, 2006, at 11:38 PM, Jason B. wrote:

Ken & others,

After going home and troubleshooting this more and looking at the
archive postings I noticed that some people got it working by
changing the Template to the following:

To: {my $old_owner = RT::User->new($RT::System);
$old_owner->Load($Transaction->OldValue);
$old_owner->EmailAddress()}
Subject: Ticket #{$Ticket->Id()} taken by {$Ticket->OwnerObj->Name
()}

A ticket you owned:

“{$Ticket->Subject()}”

has been taken by {$Ticket->OwnerObj->Name()}

{$RT::WebURL}Ticket/Display.html?id={$Ticket->Id()}

Basically changing the $RT::System part. It worked for others
though its not working for me. I do see that my Everyone Group
does have ShowOutgoingMail along with Every group that I have
created that has the ShowOutgoingMail. I noticed the following
in the /var/log/messages

Mar 8 23:30:31 admin RT: Successful login for jbartels from
24.26.232.60 (/usr/share/request-tracker3.4/html/autohandler:197)
Mar 8 23:30:48 admin RT:
rt-3.4.1-2188-21627-2.19.1568452421506@something.com
#2188/21627 - Scrip 2 (/usr/share/request-tracker3.4/lib/RT/
Action/SendEmail.pm:235)
Mar 8 23:30:48 admin RT:
<rt-3.4.1-2188-21627-2.19.1568452421506@something.com.> No
recipients found. Not sending. (/usr/share/request-tracker3.4/
lib/RT/Action/SendEmail.pm:247)
Mar 8 23:30:48 admin RT:
rt-3.4.1-2188-21627-15.13.6658577819274@something.com
#2188/21627 - Scrip 15 Ticket Stolen (/usr/share/request-
tracker3.4/lib/RT/Action/SendEmail.pm:235)
Mar 8 23:30:48 admin RT:
rt-3.4.1-2188-21627-15.13.6658577819274@something.com No
recipients found. Not sending. (/usr/share/request-tracker3.4/
lib/RT/Action/SendEmail.pm:247)

Okay so when I test it by pressing the Steal ticket it only works
if the root user has the ticket (just did it for testing) but if
I use a real user say jbartels and have jtest user steal it I do
not receive an e-mail and it shows that error message in the log
file.

I want the e-mail sent to the user that use to have the ticket
before it was stolen. So it would go to jbartels if the jtest
user stole it. Not sure where I went wrong. I also searched the
archives and it said to try using the

Set($NotifyActor, 0);

Which doesn’t help anything.

Any thoughts?

-jason

On Mar 8, 2006, at 6:49 PM, Ken Crocker wrote:

JAson, to whom did you want the e_mail to go to and did you give
that role (like requestor) or group the "SeeOutgoingMail"
priviledge? If not, then you can have a hundred scrips that will
go nowhere if no one has the priviledge of seeing outgoing mail.

Kenn


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

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

We’re hiring! Come hack Perl for Best Practical: http://
bestpractical.com/about/jobs.html