Hi Nigel,

Nigel Gibbs wrote:
I have to get OTRS to work with a web-based asset register. Particularly, we need to the ability to assign each OTRS ticket to an asset. My approach has been to stuff the TicketFreeKey1 and TicketFreeText1 with AssetIDs from our asset database from within Config.pm...

        ....

        $Self->{"TicketFreeKey1"} = {
                'AsssetID' => 'AssetID',
        };

        ....   # connect to asset DB using DBI

        while( $resptr =  $rs->fetchrow_hashref() )
        {
            $Self->{"TicketFreeText1"}{ $row->{"AssetID"} } = $row->{"Desc"} ;
        }

        ....

The trouble is that with 2000 rows in the table, there is a huge overhead on every page hit for what is only needed on a few entry screens.

Can anyone please suggest a better place to put this code so that it only has to run once for each users session, and where the variables $Self->{"TicketFreeKey1"} and $Self->{"TicketFreeText1"} can still be 'seen' in the necessary pages?

In this case I would put this (and the logic to fetch just a few entry) in Kernel/System/Ticket.pm TicketGet().


Or in other case put a a href with the AssetID to an external web interface to show your asset data there.

Nigel

Martin

--
((otrs.de)) :: OTRS GmbH :: Norsk-Data-Str. 1 :: 61352 Bad Homburg
        http://www.otrs.de/ :: Manage your communication!
_______________________________________________
OTRS mailing list: dev - Webpage: http://otrs.org/
Archive: http://lists.otrs.org/pipermail/dev
To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/dev

Reply via email to