[rt-users] Custom RTIR Action but rt-crontool can't seem to find it
Kevin Falcone
falcone at bestpractical.com
Tue Jul 2 16:27:28 EDT 2013
On Tue, Jul 02, 2013 at 01:13:15PM -0700, Landon wrote:
> Hello,
> I've copied RTIR_FindIP.pm to RTIR_CustomFindIP.pm, edited the package name within the file
> and modified the ScripActions table entry and rt-crontool finds it without a problem.
> But I have a problem with a new one. I've created a new RTIR_Classify.pm and modified the
> package in the file and added it to ScripActions using "sbin/rt-setup-database --action insert
> --datafile ." and I can see it listed there but rt-crontool cannot find it.
> # stat /opt/rt4/local/plugins/RT-IR/lib/RT/Action/RTIR_Classify.pm
> File: `/opt/rt4/local/plugins/RT-IR/lib/RT/Action/RTIR_Classify.pm'
> Size: 815 Blocks: 8 IO Block: 4096 regular file
> Device: ca06h/51718d Inode: 23197 Links: 1
> Access: (0444/-r--r--r--) Uid: ( 0/ root) Gid: ( 0/ root)
> Access: 2013-07-02 15:53:56.305283436 -0400
> Modify: 2013-07-02 15:53:56.305283436 -0400
> Change: 2013-07-02 15:57:15.078335450 -0400
> mysql> SELECT * FROM ScripActions WHERE ExecModule = "RTIR_Classify";
> +----+--------------------------------+----------------------------------------------------------+-------------------+----------+---------+---------------------+---------------+---------------------+
> | id | Name | Description | ExecModule | Argument | Creator | Created | LastUpdatedBy |
> LastUpdated |
> +----+--------------------------------+----------------------------------------------------------+-------------------+----------+---------+---------------------+---------------+---------------------+
> | 47 | RTIR Classify Tickets | Classifies and prioritize tickets based on their content |
> RTIR_Classify | NULL | 1 | 2013-07-02 19:37:05 | 1 | 2013-07-02 19:37:05 |
> +----+--------------------------------+----------------------------------------------------------+-------------------+----------+---------+---------------------+---------------+---------------------+
> 1 row in set (0.00 sec)
> # /opt/rt4/bin/rt-crontool --search RT::Search::ActiveTicketsInQueue \
> --search-arg "Incident Reports" --action RT::Action::RTIR_Classify \
> --transaction all --verbose
> Failed to load module RT::Action::RTIR_Classify. () at /opt/rt4/bin/rt-crontool line 304.
> Hrmmmm . What am I missing? What do I not know about the magic of RTIR here? Again, the copied
> RTIR_CustomFindIP.pm gets found without a problem and works like a champ.
My random guesses would be that the file has the wrong package,
doesn't return a true value or otherwise fails to compile.
If you open up rt-crontool and look right above line 304, it's doing a
simple 'require' of the module. If RT::Action::RTIR_CustomFindIP
works, then it isn't a library path problem, which means it's
likely something wrong with your perl module.
-kevin
-------------- 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/20130702/4a039852/attachment.sig>
More information about the rt-users
mailing list