Hello all,

Started using RT today, and am trying to write my own scrip. As per 
http://requesttracker.wikia.com/wiki/WriteCustomAction

I've tried copying the example using this:

(current iteration)

MyScrip.pm (in the actions folder)
[code]
package RT::Action::MyScrip;

use strict;
use warnings;

sub Prepare {
  my $self = shift;

  return 1;
}

sub Commit {
  my $self = shift;

  return 1;
}

1;
[/code]

I have the scrip and action setup but my log is throwing this:

[log]
[Tue May 24 14:08:35 2011] [debug]: Found 1 scrips for TransactionCreate stage 
with applicable type(s) Create for txn #248 on ticket #41 
(/usr/local/lib/perl5/site_perl/5.10.1/RT/Scrips_Overlay.pm:377)
[Tue May 24 14:08:35 2011] [error]: Scrip Prepare 1 died. - Require of 
RT::Action:: MyScrip failed.
Attempt to reload RT/Action/MyScrip.pm aborted.
Compilation failed in require at (eval 5748) line 3.

Stack:
  [(eval 5748):3]
  [/usr/local/lib/perl5/site_perl/5.10.1/RT/Scrip_Overlay.pm:443]
  [/usr/local/lib/perl5/site_perl/5.10.1/RT/Scrips_Overlay.pm:241]
  [/usr/local/lib/perl5/site_perl/5.10.1/RT/Transaction_Overlay.pm:169]
  [/usr/local/lib/perl5/site_perl/5.10.1/RT/Record.pm:1457]
  [/usr/local/lib/perl5/site_perl/5.10.1/RT/Ticket_Overlay.pm:660]
  [/usr/local/lib/perl5/site_perl/5.10.1/RT/Interface/Email.pm:1466]
  [/usr/local/share/rt38/html/REST/1.0/NoAuth/mail-gateway:61]


Stack:
  [/usr/local/lib/perl5/site_perl/5.10.1/RT/ScripAction_Overlay.pm:173]
  [/usr/local/lib/perl5/site_perl/5.10.1/RT/Scrip_Overlay.pm:443]
  [/usr/local/lib/perl5/site_perl/5.10.1/RT/Scrips_Overlay.pm:241]
  [/usr/local/lib/perl5/site_perl/5.10.1/RT/Transaction_Overlay.pm:169]
  [/usr/local/lib/perl5/site_perl/5.10.1/RT/Record.pm:1457]
  [/usr/local/lib/perl5/site_perl/5.10.1/RT/Ticket_Overlay.pm:660]
  [/usr/local/lib/perl5/site_perl/5.10.1/RT/Interface/Email.pm:1466]
  [/usr/local/share/rt38/html/REST/1.0/NoAuth/mail-gateway:61] 
(/usr/local/lib/perl5/site_perl/5.10.1/RT/Scrip_Overlay.pm:451)
[Tue May 24 14:08:35 2011] [debug]: Skipping Scrip #1 because it didn't Prepare 
(/usr/local/lib/perl5/site_perl/5.10.1/RT/Scrips_Overlay.pm:244)

[/log]

Can't figure out the problem since I am working from the example.
Any help/advice/example to copy from?

--------------------------------

Barry Carlyon
Freelance Web Developer
Freelance Lighting/AV Engineer

http://barrycarlyon.co.uk

mobile: 07729 048 443
skype: barrycarlyon
email: ba...@barrycarlyon.co.uk
msn: ba...@barrycarlyon.co.uk

Reply via email to