[Rt-devel] Problem redefining hashes in Tickets_Local.pm

Todd Chapman todd at chaka.net
Fri Mar 3 17:21:59 EST 2006


On Fri, Mar 03, 2006 at 01:12:14PM -0800, Michael Gilbert wrote:
> Hello,
> I'm having what is likely a simple problem, but I haven't been able to 
> come up with the answer on my own yet and was hoping for some advice.
> 
> What I'm trying to do is add keys to the %FIELDS and %dispatch hashes in 
> Tickets_Local in order to handle searches on a custom Tags table, 
> however the new keys are never properly added to the hashes.  I've 
> attempted including them directly in the hash declarations:
> %Fields =
> ...
>    Tag              => [ 'TAG', ],
>    Tags             => [ 'TAG', ],
> %dispatch =
> ...
>    TAG             => \&_TagLimit,
> 
> As well as adding them in after the fact:
> $FIELDS{'Tag'}  = ['TAG'];
> $FIELDS{'Tags'} = ['TAG'];
> $dispatch{'TAG'} = \&_TagLimit;
> 
> Neither of which seems to have any affect on the hashes at runtime.  
> Both of the above work properly, however, when I add them directly into 
> Tickets_Overly.pm
> 
> My question is if anyone knows of a way to update these hashes without 
> modifying Tickets_Overlay (keep the update in Tickets_Local).  I would 
> guess this is a problem of scope, but I haven't yet been able to find a 
> way around it (including completely commenting out the FIELDS and 
> dispatch declarations in Tickets_Overlay).
> 

In your _Local file are you setting the package name?

package RT::Tickets;



-Todd


More information about the Rt-devel mailing list