[rt-users] Can't load UntouchedInHours module
Kevin Falcone
falcone at bestpractical.com
Thu Aug 29 16:35:14 EDT 2013
On Thu, Aug 29, 2013 at 05:39:33PM +0000, Elliott, Kevin C (DOR) wrote:
>
> [Thu Aug 29 17:32:17 2013] [critical]: Failed to load module RT::Condition::UntouchedInHours. () at /usr/bin/rt-crontool line 307. (/usr/share/request-tracker4/lib/RT.pm:351)
> Failed to load module RT::Condition::UntouchedInHours. () at /usr/bin/rt-crontool line 307.
>
> root at DorJnuASD-RT:~/Bin# cat /usr/share/request-tracker4/lib/RT/Condition/UntouchedInHours.pm
>
> package RT::Condition::UntouchedInHours;
> require RT::Condition::Generic;
>
> use RT::Date;
>
>
> @ISA = qw(RT::Condition::Generic);
At the very least, this line is wrong:
http://bestpractical.com/docs/rt/latest/UPGRADING-4.0.html#Removals-and-updates
You want to inherit from RT::Condition.
-kevin
> use strict;
> use vars qw/@ISA/;
>
> sub IsApplicable {
> my $self = shift;
>
> if ((time()-$self->TicketObj->LastUpdatedObj->Unix)/3600 >= $self->Argument) {
> return 1;
> }
> else {
> return 0;
> }
>
> }
>
> # The following could be omitted. They're there to allow overrides from Vendor and Local
> # but as this isn't a core module, they're just there for completeness :)
> eval "require RT::Condition::UntouchedInHours_Vendor";
> die $@ if ($@ && $@ !~ qr{^Can't locate RT/Condition/UntouchedInHours_Vendor.pm});
> eval "require RT::Condition::UntouchedInHours_Local";
> die $@ if ($@ && $@ !~ qr{^Can't locate RT/Condition/UntouchedInHours_Local.pm});
>
> 1;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 235 bytes
Desc: not available
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20130829/92c81a03/attachment.sig>
More information about the rt-users
mailing list