[rt-users] DueDateInBusinessHours not working

Brumm, Torsten / Kuehne + Nagel / Ham MI-ID torsten.brumm at Kuehne-Nagel.com
Tue Nov 17 08:02:44 EST 2009


Hi Tony,
have you installed the the CPAN Module BUSINESS::HOURS ??

I think copy this to RT folder is not the correct way.

Normally: perl -MCPAN -e 'install Business::Hours' should fix your problem

Torsten 


Kuehne + Nagel (AG & Co.) KG, Geschaeftsleitung: Hans-Georg Brinkmann (Vors.), Dirk Blesius (Stellv.), Reiner Heiken (Stellv.), Bruno Mang, Alfred Manke, Christian Marnetté (Stellv.), Mark Reinhardt (Stellv.), Jens Wollesen, Rainer Wunn, Sitz: Bremen, Registergericht: Bremen, HRA 21928, USt-IdNr.: DE 812773878, Persoenlich haftende Gesellschaft: Kuehne & Nagel A.G., Sitz: Contern/Luxemburg Geschaeftsfuehrender Verwaltungsrat: Klaus-Michael Kuehne



-----Urspruengliche Nachricht-----
Von: rt-users-bounces at lists.bestpractical.com [mailto:rt-users-bounces at lists.bestpractical.com] Im Auftrag von Tony John , Bangalore
Gesendet: Dienstag, 17. November 2009 09:31
An: rt-users at lists.bestpractical.com
Betreff: [rt-users] DueDateInBusinessHours not working

Hi Folks,
Please find below the scrip and error log file which I got while executing the scrip:

Description: Business Hours   

Condition:  On Create

Action:  User Defined  

Template: Global template: Blank 

Stage:  TransactionCreate 

Custom condition:

Custom action preparation code:
return 1;

Custom action cleanup code:
my $duedate = RT::Date->new($RT::SystemUser); my $hoursuntildue = 4; use Business::Hours; my $hours = Business::Hours->new(); my $curtime = time; my $bus_hours_duetime = $hours->add_seconds ($curtime, ($hoursuntildue*60*60)); $duedate->Set(Format=>'unix', Value=>$bus_hours_duetime); $self->TicketObj->SetDue($duedate->ISO);
return 1;


Error Log File 
[Tue Nov 17 07:24:05 2009] [error]: Scrip 117 Commit failed: Can't locate Business/Hours.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.1        0.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/perl        5/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 . /etc/httpd) at (eval 482) line 3.


So I pasted the BusinessHours.pm file from the CPAN org in the RT folder but its still givin the same error.What should I do access this package class ? Or is anything wrong in the placing of the file BusinessHours.pm  in RT folder? 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




More information about the rt-users mailing list