G'day Martin,
Yep. Done all that you have mentioned. Just disregard what I've said in my original email. It was a confusion that I had.
It was because, I load the SysLog as soon as I activated the new module. For some reason, a ticketObj is created by OTRS and the TicketSearch is invoked by OTRS - even while I am only reload the SysLog. Not sure why this happened - but that doesn't affect my module.
Hi Robert,
Robert Bui schrieb:
> I am trying to write a module that will take in the customer ID and
> ticket number, without requiring the customer to log in, able to search
> and display the ticket detail including status.
> Base on the documentation, I got the module skeleton all work out.
> However, when I trying debugging the module, I get
> Kernel::System::Web::InterfaceAgent::Run invoked as well as my own
> module, Ticket.new():Kernel::Modules::PublicTicketSearch::Run. For some
> reasons, Kernel::Modules::PublicTicketSearch::Run creates an instance of
> a TicketObj and invokes the TicketObj.TicketSearch function.
> Could someone assist by enlightening me on why/how
> Kernel::System::Web::InterfaceAgent::Run got called. What I did was I
> copied InterfacePublicTicketSearch.pm from InterfaceAgent.pm and have
> changed all references from InterfaceAgent to InterfacePublicTicketSearch.
> Inside the CGI-script, I have these lines:
> # load agent web interface
> use Kernel::System::Web::InterfacePublicTicketSearch();
>
> # create new object
> my $Interface =
> Kernel::System::Web::InterfacePublicTicketSearch->new(Debug => $Debug);
That's not the right way. You just need to create a new frontend module
like:
o Kernel/Modules/PublicTicketSearch.pm
and the module registration in Kernel/Config.pm (or over .xml files, but
this as second step):
$Self->{'PublicFrontend::Module'}->{'PublicTicketSearch'} = {
'Description' => 'Public Ticket Serach Module used by CustomerID and
TicketNumber.',
'Title' => 'Public Ticket Search'
};
Which can get called now over the URL e. g.
http://host/otrs/public.pl?Action=PublicTicketSearch
(-> Important, this Action= means you call the
Kernel/Modules/PublicTicketSearch.pm module!)
For more infos see also the developer manual e. g. Frontend Modules
( http://doc.otrs.org/developer/2.1/en/html/x348.html) and some other
demo modules like the FAQ module. There are some examples.
Many Thanks,
-Martin
((otrs)) :: OTRS GmbH :: Europaring 4 :: D - 94315 Straubing
Fon: +49 (0) 9421 56818 0 :: Fax: +49 (0) 9421 56818 18
http://www.otrs.com/ :: Communication with success!
_______________________________________________
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