How to register a new agent module?

Moderator: crythias

Locked
pb81
Znuny newbie
Posts: 4
Joined: 17 Jun 2014, 09:53
Znuny Version: 3.2.10
Real Name: Fabio Corrado

How to register a new agent module?

Post by pb81 »

Hello, i'm Fabio and i'm italian, i'll try to be clear as much as i can, but please be patient for my english :-)

My company asked me to create a new ticket template with prefilled forms, tables and editable fields. The first way i tried was to create it in html, then url coded and inserted under Ticket -> Frontend::Agent::ModuleRegistration::###AgentTicketPhone as a new group, with the URL in the link field.
No problem with simple text but not working with long urls..of course.
Then tryied to create a new set of modules from the AgentTicketPhone called AgentTicketBuy, almost the same but with the html code directly embedded in the body field. I made both the .dtm and the .pm, placed in the same locations as the original files, but when i try to recall it by the new ticket button i get this error:

Module Kernel::Modules::AgentTicketBuy not registered in Kernel/Config.pm!

How can i register it?

Thanks
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: How to register a new agent module?

Post by crythias »

create an .xml file

An example is
viewtopic.php?f=60&t=10090&p=39314
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
pb81
Znuny newbie
Posts: 4
Joined: 17 Jun 2014, 09:53
Znuny Version: 3.2.10
Real Name: Fabio Corrado

Re: How to register a new agent module?

Post by pb81 »

Do i have to add a pointer in /opt/otrs/Kernel/Config/Files/ticket.xml or a brand new ticketwhatever.xml? Links in the thread you gave are not working..

Thanks!
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: How to register a new agent module?

Post by crythias »

links don't work, but the xml is shown in a copiable code snippet on the page.
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
pb81
Znuny newbie
Posts: 4
Joined: 17 Jun 2014, 09:53
Znuny Version: 3.2.10
Real Name: Fabio Corrado

Re: How to register a new agent module?

Post by pb81 »

Yes i've seen it, but i'm totally new to scripting and otrs, so it takes some time to me to understand names, paths and coding..
Something like that?

Code: Select all

<?xml version="1.0" encoding="utf-8" ?>
<otrs_config version="1.0" init="Changes">
    <ConfigItem Name="Ticket::Frontend::Agent::ModuleRegistration" Required="0" Valid="1">
        <Description Lang="en"></Description>
        <Description Lang="de"></Description>
        <Group>EventModulePostTemplate</Group>
        <SubGroup>EventModule</SubGroup>
        <Setting>
            <Hash>
                <Item Key="Module">Kernel::Modules::AgentTicketBuy</Item>
                <Item Key="Event">(AgentTicketBuy)</Item>
            </Hash>
        </Setting>
    </ConfigItem>
</otrs_config>
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: How to register a new agent module?

Post by crythias »

no, this isn't it.

Registration happens when the module is enabled in SysConfig (checkbox checked).

Just look at other entries ... like this one: viewtopic.php?f=60&t=24723
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
pb81
Znuny newbie
Posts: 4
Joined: 17 Jun 2014, 09:53
Znuny Version: 3.2.10
Real Name: Fabio Corrado

Re: How to register a new agent module?

Post by pb81 »

Ok, i added an entry to the existing xml file, appeared and checked in the agent registration module but when i try to open a new buy request i have an internal server error in the browser...
Thanks crythias for today, tomorrow i'll do some more experiments
Locked