[rt-users] rt-crontool error

Torsten Brumm torsten.brumm at googlemail.com
Tue Nov 24 05:24:12 EST 2009


Looks like you copied not all needed information from wiki into the
UntouchedInHours.pm:

Yours:

package RT::Condition::UntouchedInHours;
require RT::Condition::Generic;

use RT::Date;


@ISA = qw(RT::Condition::Generic);


use strict;
use vars qw/@ISA/;

sub IsApplicable {
        my $self = shift;
        if ((time()-$self->TicketObj->LastUpdatedObj->Unix)/3600 >=
$self->Argument and $self->TicketObj->Owner==6) {
                return 1
        }
        else {
                return 0;
        }
}

1;

Wiki (you used the alternate version)

package RT::Condition::UntouchedInHours;
require RT::Condition::Generic;

use RT::Date;


@ISA = qw(RT::Condition::Generic);


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;



2009/11/24 TONY JOHN - ERS, HCL Tech <tonyjohn at hcl.in>

>
>
> Hi,
>
>
>
> PFA UntouchedInHours.pm
>
>
>
> Regards,
>
> Tony
>  ------------------------------
>
> *From:* TONY JOHN - ERS, HCL Tech
> *Sent:* Tuesday, November 24, 2009 3:31 PM
> *To:* 'Torsten Brumm'
>
> *Cc:* rt-users at lists.bestpractical.com
> *Subject:* RE: [rt-users] rt-crontool error
>
>
>
> Hi ,
>
>
>
> Now I’m getting a different error:
>
> [root at localhost sbin]# rt-crontool  --search
> RT::Search::ActiveTicketsInQueue  --search-arg CI new  --condition
> RT::Condition::UntouchedInHours --condition-arg 4  --action
> RT::Action::SetPriority --action-arg 5 --verbose
>
> [Tue Nov 24 09:59:59 2009] [debug]: You've enabled GraphViz, but we
> couldn't load the module: Can't locate GraphViz.pm in @INC (@INC contains:
> /usr/local/lib/rt3/lib
> /usr/local/lib/rt3/plugins/RT-Extension-CustomField-Checkbox/lib
> /usr/lib/perl5/vendor_perl/5.10.0
> /usr/local/lib/perl5/site_perl/5.10.0/i386-linux-thread-multi
> /usr/local/lib/perl5/site_perl/5.10.0
> /usr/lib/perl5/vendor_perl/5.10.0/i386-linux-thread-multi
> /usr/lib/perl5/vendor_perl /usr/lib/perl5/5.10.0/i386-linux-thread-multi
> /usr/lib/perl5/5.10.0 /usr/lib/perl5/site_perl .) at
> /usr/lib/perl5/vendor_perl/5.10.0/RT/Config.pm line 311.
> (/usr/lib/perl5/vendor_perl/5.10.0/RT/Config.pm:312)
>
> [Tue Nov 24 09:59:59 2009] [crit]: Failed to load module
> RT::Condition::UntouchedInHours. (Can't locate RT/I18N/en_us.pm in @INC
> (@INC contains: /usr/local/lib/rt3/lib
> /usr/local/lib/rt3/plugins/RT-Extension-CustomField-Checkbox/lib
> /usr/lib/perl5/vendor_perl/5.10.0
> /usr/local/lib/perl5/site_perl/5.10.0/i386-linux-thread-multi
> /usr/local/lib/perl5/site_perl/5.10.0
> /usr/lib/perl5/vendor_perl/5.10.0/i386-linux-thread-multi
> /usr/lib/perl5/vendor_perl /usr/lib/perl5/5.10.0/i386-linux-thread-multi
> /usr/lib/perl5/5.10.0 /usr/lib/perl5/site_perl .) at (eval 319) line 3.
>
> ) at /usr/sbin/rt-crontool line 256.
> (/usr/lib/perl5/vendor_perl/5.10.0/RT.pm:377)
>
> Failed to load module RT::Condition::UntouchedInHours. (Can't locate
> RT/I18N/en_us.pm in @INC (@INC contains: /usr/local/lib/rt3/lib
> /usr/local/lib/rt3/plugins/RT-Extension-CustomField-Checkbox/lib
> /usr/lib/perl5/vendor_perl/5.10.0
> /usr/local/lib/perl5/site_perl/5.10.0/i386-linux-thread-multi
> /usr/local/lib/perl5/site_perl/5.10.0
> /usr/lib/perl5/vendor_perl/5.10.0/i386-linux-thread-multi
> /usr/lib/perl5/vendor_perl /usr/lib/perl5/5.10.0/i386-linux-thread-multi
> /usr/lib/perl5/5.10.0 /usr/lib/perl5/site_perl .) at (eval 319) line 3.
>
> ) at /usr/sbin/rt-crontool line 256.
>
> [root at localhost sbin]#
>
>
>
> Regards,
>
> Tony
>  ------------------------------
>
> *From:* Torsten Brumm [mailto:torsten.brumm at googlemail.com]
> *Sent:* Tuesday, November 24, 2009 3:26 PM
> *To:* TONY JOHN - ERS, HCL Tech
> *Cc:* rt-users at lists.bestpractical.com
> *Subject:* Re: [rt-users] rt-crontool error
>
>
>
> Have you installed GraphViz from CPAN`?
>
> 2009/11/24 TONY JOHN - ERS, HCL Tech <tonyjohn at hcl.in>
>
> Hi,
>
> I am trying to run rt-crontool but fails to set the priority value.
>
> The coomand promt error is given below:
>
>
>
> [root at localhost sbin]# rt-crontool  --search
> RT::Search::ActiveTicketsInQueue  --search-arg CI new  --condition
> RT::Condition::UntouchedInHours --condition-arg 4  --action
> RT::Action::SetPriority --action-arg 5  --verbose
>
> [Tue Nov 24 08:47:50 2009] [debug]: You've enabled GraphViz, but we
> couldn't load the module: Can't locate GraphViz.pm in @INC (@INC contains:
> /usr/local/lib/rt3/lib
> /usr/local/lib/rt3/plugins/RT-Extension-CustomField-Checkbox/lib
> /usr/lib/perl5/vendor_perl/5.10.0
> /usr/local/lib/perl5/site_perl/5.10.0/i386-linux-thread-multi
> /usr/local/lib/perl5/site_perl/5.10.0
> /usr/lib/perl5/vendor_perl/5.10.0/i386-linux-thread-multi
> /usr/lib/perl5/vendor_perl /usr/lib/perl5/5.10.0/i386-linux-thread-multi
> /usr/lib/perl5/5.10.0 /usr/lib/perl5/site_perl .) at
> /usr/lib/perl5/vendor_perl/5.10.0/RT/Config.pm line 311.
> (/usr/lib/perl5/vendor_perl/5.10.0/RT/Config.pm:312)
>
> [Tue Nov 24 08:47:50 2009] [warning]: Use of uninitialized value in
> concatenation (.) or string at
> /usr/lib/perl5/vendor_perl/5.10.0/RT/Tickets_Overlay_SQL.pm line 261.
> (/usr/lib/perl5/vendor_perl/5.10.0/RT/Tickets_Overlay_SQL.pm:261)
>
> [root at localhost sbin]#
>
>
>
> Any help?
>
>
>
> Regards,
>
> Tony john
>
>
>
> DISCLAIMER:
>
> -----------------------------------------------------------------------------------------------------------------------
>
>
>
> The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only.
>
> It shall not attach any liability on the originator or HCL or its affiliates. Any views or opinions presented in
>
> this email are solely those of the author and may not necessarily reflect the opinions of HCL or its affiliates.
>
> Any form of reproduction, dissemination, copying, disclosure, modification, distribution and / or publication of
>
> this message without the prior written consent of the author of this e-mail is strictly prohibited. If you have
>
> received this email in error please delete it and notify the sender immediately. Before opening any mail and
>
> attachments please check them for viruses and defect.
>
>
>
> -----------------------------------------------------------------------------------------------------------------------
>
>
> _______________________________________________
> http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
>
> Community help: http://wiki.bestpractical.com
> Commercial support: sales at bestpractical.com
>
>
> Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
> Buy a copy at http://rtbook.bestpractical.com
>
>
>
>
> --
> MFG
>
> Torsten Brumm
>
> http://www.brumm.me
> http://www.elektrofeld.de
>



-- 
MFG

Torsten Brumm

http://www.brumm.me
http://www.elektrofeld.de
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20091124/bf6067d9/attachment.htm>


More information about the rt-users mailing list