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

Michael Gilbert mdgilb at u.washington.edu
Fri Mar 3 16:12:14 EST 2006


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).

Thanks,

Michael Gilbert
SSG, University of Washington


More information about the Rt-devel mailing list