请求跟踪器:通知以前的所有者

时间:2014-01-28 04:54:06

标签: perl request owner tracker rt

我希望能够在有人偷票时向前任所有者发送电子邮件,目前使用Request Tracker我可以向新所有者发送电子邮件,但不能向之前的所有者发送电子邮件。

似乎有一个扩展允许这个,但它不支持RT 4.2(我使用的是4.2.1):http://metacpan.org/pod/RT::Extension::NotifyOwners

任何帮助将不胜感激,如果有人设置此设置或使用RT 4.2上的扩展程序将是伟大的。我很确定你可以用自定义动作做到这一点,但我对这方面的知识不足。

日志错误:

root@WEBSVR01:/home/steven# cpanm RT::Extension::NotifyOwners
--> Working on RT::Extension::NotifyOwners
Fetching http://www.cpan.org/authors/id/I/ID/IDN/RT-Extension-NotifyOwners-0.02.tar.gz ... OK
Configuring RT-Extension-NotifyOwners-0.02 ... N/A
! Configure failed for RT-Extension-NotifyOwners-0.02. See /root/.cpanm/work/1390880978.19447/build.log for details.
root@WEBSVR01:/home/steven# tail /root/.cpanm/work/1390880978.19447/build.log
Unpacking RT-Extension-NotifyOwners-0.02.tar.gz
Entering RT-Extension-NotifyOwners-0.02
Checking configure dependencies from META.yml
Checking if you have ExtUtils::MakeMaker 6.42 ... Yes (6.82)
Configuring RT-Extension-NotifyOwners-0.02
Running Makefile.PL
Cannot find the location of RT.pm that defines $RT::LocalPath in: inc /etc/perl /usr/local/lib/perl/5.14.2 /usr/local/sh                     are/perl/5.14.2 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.14 /usr/share/perl/5.14 /usr/local/lib/site_perl . /opt/                     rt3/lib /opt/lib/rt3 /opt/lib /usr/local/rt3/lib /usr/local/lib/rt3 /usr/local/lib /home/rt3/lib /home/lib/rt3 /home/lib                      /usr/rt3/lib /usr/lib/rt3 /usr/lib /sw/rt3/lib /sw/lib/rt3 /sw/lib
Path to directory containing your RT.pm:
-> N/A
-> FAIL Configure failed for RT-Extension-NotifyOwners-0.02. See /root/.cpanm/work/1390880978.19447/build.log for details.

1 个答案:

答案 0 :(得分:0)

您可以通过脚本和模板实现这一目标。 Scrip On Steal Notify Old Owner应该是这样的:

my $field = $self->TransactionObj->Field;
my $type = $self->TransactionObj->Type;

return 0 unless defined($field);
return 0 unless $field eq 'Owner';
return 0 unless $type eq 'Set';
return 0 if $self->TransactionObj->OldValue == $self->TransactionObj->Creator;

return 1 if $self->TransactionObj->OldValue != RT::Nobody()->id();

return 0;
脚本的

条件应为User defined操作应为Notify Other Recipients模板,例如{{ 1}}。

Perl模板Stolen Ticket将是例如这一个:

Stolen Ticket
相关问题