[rt-users] Write a Custom Action in rt4 as a Module/package ERROR

Christian Loos cloos at netcologne.de
Fri Oct 26 09:17:25 EDT 2012


uncomment this line:
#use base qw(RT::Action);

Chris

Am 26.10.2012 15:02, schrieb Red Pantyhose:
> Dear rt-users
> 
> I created the following ActionScrip Module below -  the Module is
> registered.
> 
> But i get the following Error:
> 
> Oct 26 14:42:49 rt RT: Scrip Prepare 14 died. - Can't locate object
> method "new" via package "RT::Action::OpenSystemCustomFields" at
> /usr/share/request-tracker4/lib/RT/ScripAction.pm line
> 175.#012#012Stack:#012 
> [/usr/share/request-tracker4/lib/RT/ScripAction.pm:175]#012 
> [/usr/share/request-tracker4/lib/RT/Scrip.pm:443]#012 
> [/usr/share/request-tracker4/lib/RT/Scrips.pm:252]#012 
> [/usr/share/request-tracker4/lib/RT/Transaction.pm:179]#012 
> [/usr/share/request-tracker4/lib/RT/Record.pm:1459]#012 
> [/usr/share/request-tracker4/lib/RT/Ticket.pm:676]#012 
> [/usr/share/request-tracker4/lib/RT/Interface/Web.pm:1711]#012 
> [/usr/share/request-tracker4/html/Ticket/Display.html:128]#012 
> [/usr/share/request-tracker4/html/Ticket/Create.html:444]#012 
> [/usr/share/request-tracker4/html/Ticket/autohandler:19]#012 
> [/usr/share/request-tracker4/lib/RT/Interface/Web.pm:568]#012 
> [/usr/share/request-tracker4/lib/RT/Interface/Web.pm:318]#012 
> [/usr/share/request-tracker4/html/autohandler:53]
> (/usr/share/request-tracker4/lib/RT/Scrip.pm:451)
> 
> I'm using rt-4.0.5.
> 
> What am I doing wrong ?
> 
> Thanks Sincerely
> 
> Denis
> 
> 
> #-------------------------------------OpenSystemCustomFields.init-------------------------------------------#
> 
> # To initialize the OpenSystemCustomFields ActionScrip:
> # rt-setup-database-4 --action insert --datafile OpenSystemCustomFields.init
> 
> @ScripActions = (
> {
>    Name        => 'OpenSystemCustomFields',
>    Description => 'Create CustomFields from data retrieved out of the
> OpenSystem DB',
>    ExecModule  => 'OpenSystemCustomFields',
>    Argument    => ''
>  },
> );
> 
> 
> 
> 
> #-------------------------------------OpenSystemCustomFields.pm-------------------------------------------#
> use strict;
> use warnings;
> 
> package RT::Action::OpenSystemCustomFields;
> 
> #use base qw(RT::Action);
> 
> #use base qw(RT::Action::Generic);
> 
> sub Prepare {
>   my $self = shift;
>   return 1;
> }
> 
> sub Commit {
>   my $self = shift;
>   return 1;
> }
> 
> # ;)
> 1;
> 
> 
> 
> 
> 
> 
> 
> --------
> We're hiring! http://bestpractical.com/jobs
> 




More information about the rt-users mailing list