
Greetings list, I wonder where I can find a comprehensive documentation on how to write and install modules in OTRS2. I made some efforts mimicing some of the simpler internal modules but already ran into trouble by just renaming an existent module (namely AgentTicketCustomer) and trying to incorporate it into the MenuModule - it shows up in the ticket menu but calling the appropriate URL[1] throws me a "Can't locate Kernel/Modules/myModule.pm in @INC (@INC contains: ../../[..]" So I wondered about a bunch of questions: - if INC contains relative paths, which directory are they relative to? The one containing index.pl? - where/how is INC assembled? - why does it work for all kind of in-the-box modules but does not work for "mine"? - why can't I find any documentation on how to write new modules for OTRS2? Thanks for helping out. [1] http://otrs/index.pl?Action=myModule&TicketID=10 -- Denis Jedig syneticon networks GbR http://syneticon.net/service/

On Tuesday 07 March 2006 18:10, Denis Jedig wrote:
Greetings list,
I wonder where I can find a comprehensive documentation on how to write and install modules in OTRS2.
yeah, that would be so nice :)
I made some efforts mimicing some of the simpler internal modules but already ran into trouble by just renaming an existent module (namely AgentTicketCustomer) and trying to incorporate it into the MenuModule - it shows up in the ticket menu but calling the appropriate URL[1] throws me a "Can't locate Kernel/Modules/myModule.pm in @INC (@INC contains: ../../[..]"
I solved this by registering myModule in Kernel/Config/Files/ I did not perfectly understand where/how to register a module, but using the existing registered modules I managed to do it. For example, I have a module that displays/modify(+other sstuff) some info on a customer, in Ticket.xml I copied the section for AgentCustomerInfo, and modified it to fit myModule (mostly renaming some xml keys/data). Here's an example, my module is named AgentLiveCustomer : $ grep -C 15 Live Ticket.xml </Setting> </ConfigItem> <ConfigItem Name="Frontend::Module###AgentTicketZoom" Required="0" Valid="1"> <Description Lang="en">Frontend module registration for the AgentTicketZoom object in the agent interface.</Description> <Description Lang="de">Frontendmodul-Registration des AgentTicketZoom-Objekts im Agent-Interface.</Description> <Group>Ticket</Group> <SubGroup>Frontend::Agent::ModuleRegistration</SubGroup> <Setting> <FrontendModuleReg> <Description>Ticket Zoom</Description> <Title>Zoom</Title> <NavBarName>Ticket</NavBarName> </FrontendModuleReg> </Setting> </ConfigItem> <ConfigItem Name="Frontend::Module###AgentLiveCustomer" Required="0" Valid="1"> <Group>Ticket</Group> <SubGroup>Frontend::Agent::ModuleRegistration</SubGroup> <Setting> <FrontendModuleReg> <Description>AgentLiveCustomer</Description> <Title>AgentLiveCustomer</Title> <NavBarName>AgentLiveCustomer</NavBarName> </FrontendModuleReg> </Setting> </ConfigItem> <ConfigItem Name="Frontend::Module###AgentCustomerInfo" Required="0" Valid="1"> <Group>Ticket</Group> <SubGroup>Frontend::Agent::ModuleRegistration</SubGroup> <Setting> <FrontendModuleReg> <Description>AgentCustomerInfo</Description> <Title>AgentCustomerInfo</Title> <NavBarName>AgentCustomerInfo</NavBarName> </FrontendModuleReg> </Setting> </ConfigItem> <ConfigItem Name="Frontend::Module###AgentTicketChat" Required="0" Valid="1"> and I've done the same thing for some other modules in Ticket.xml and Framework.xml, had no problems with it, it works sometimes, after I manually edit one of the .xml files I must also enable the new module from: Admin->SysConfig->Ticket/Framework->Frontend::Admin/Agent::ModuleRegistration I do not understand why this interface does not offer the possibility to register new modules, only to edit already existing ones. It took me some time until I figured out how to add new ones by editing the xml. the modules you will want to add, most probably will be somehow similar to existing ones (more or less), you should just grep Kernel/Config/Files/ for the existing module, and register the new one the same way the existing one is registered. this has always worked for me :)
So I wondered about a bunch of questions:
- if INC contains relative paths, which directory are they relative to? The one containing index.pl?
- where/how is INC assembled?
- why does it work for all kind of in-the-box modules but does not work for "mine"?
- why can't I find any documentation on how to write new modules for OTRS2?
Thanks for helping out.
[1] http://otrs/index.pl?Action=myModule&TicketID=10 -- Denis Jedig syneticon networks GbR http://syneticon.net/service/
_______________________________________________ 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
-- Daniel Dumitrache -- This message was scanned for spam and viruses by BitDefender. For more information please visit http://www.bitdefender.com/

Hi, About documentation related to modules, there is: http://doc.otrs.org/1.3/en/html/, chapter 24 and 25 It's 1.3, but I don't think there are that much differences with 2.0. Another usefull link is http://dev.otrs.org/ Bert. Daniel Dumitrache a écrit :
On Tuesday 07 March 2006 18:10, Denis Jedig wrote:
Greetings list,
I wonder where I can find a comprehensive documentation on how to write and install modules in OTRS2.
yeah, that would be so nice :)
I made some efforts mimicing some of the simpler internal modules but already ran into trouble by just renaming an existent module (namely AgentTicketCustomer) and trying to incorporate it into the MenuModule - it shows up in the ticket menu but calling the appropriate URL[1] throws me a "Can't locate Kernel/Modules/myModule.pm in @INC (@INC contains: ../../[..]"
I solved this by registering myModule in Kernel/Config/Files/ I did not perfectly understand where/how to register a module, but using the existing registered modules I managed to do it.
For example, I have a module that displays/modify(+other sstuff) some info on a customer, in Ticket.xml I copied the section for AgentCustomerInfo, and modified it to fit myModule (mostly renaming some xml keys/data). Here's an example, my module is named AgentLiveCustomer : $ grep -C 15 Live Ticket.xml </Setting> </ConfigItem> <ConfigItem Name="Frontend::Module###AgentTicketZoom" Required="0" Valid="1"> <Description Lang="en">Frontend module registration for the AgentTicketZoom object in the agent interface.</Description> <Description Lang="de">Frontendmodul-Registration des AgentTicketZoom-Objekts im Agent-Interface.</Description> <Group>Ticket</Group> <SubGroup>Frontend::Agent::ModuleRegistration</SubGroup> <Setting> <FrontendModuleReg> <Description>Ticket Zoom</Description> <Title>Zoom</Title> <NavBarName>Ticket</NavBarName> </FrontendModuleReg> </Setting> </ConfigItem> <ConfigItem Name="Frontend::Module###AgentLiveCustomer" Required="0" Valid="1"> <Group>Ticket</Group> <SubGroup>Frontend::Agent::ModuleRegistration</SubGroup> <Setting> <FrontendModuleReg> <Description>AgentLiveCustomer</Description> <Title>AgentLiveCustomer</Title> <NavBarName>AgentLiveCustomer</NavBarName> </FrontendModuleReg> </Setting> </ConfigItem> <ConfigItem Name="Frontend::Module###AgentCustomerInfo" Required="0" Valid="1"> <Group>Ticket</Group> <SubGroup>Frontend::Agent::ModuleRegistration</SubGroup> <Setting> <FrontendModuleReg> <Description>AgentCustomerInfo</Description> <Title>AgentCustomerInfo</Title> <NavBarName>AgentCustomerInfo</NavBarName> </FrontendModuleReg> </Setting> </ConfigItem> <ConfigItem Name="Frontend::Module###AgentTicketChat" Required="0" Valid="1">
and I've done the same thing for some other modules in Ticket.xml and Framework.xml, had no problems with it, it works
sometimes, after I manually edit one of the .xml files I must also enable the new module from: Admin->SysConfig->Ticket/Framework->Frontend::Admin/Agent::ModuleRegistration
I do not understand why this interface does not offer the possibility to register new modules, only to edit already existing ones. It took me some time until I figured out how to add new ones by editing the xml.
the modules you will want to add, most probably will be somehow similar to existing ones (more or less), you should just grep Kernel/Config/Files/ for the existing module, and register the new one the same way the existing one is registered. this has always worked for me :)
So I wondered about a bunch of questions:
- if INC contains relative paths, which directory are they relative to? The one containing index.pl?
- where/how is INC assembled?
- why does it work for all kind of in-the-box modules but does not work for "mine"?
- why can't I find any documentation on how to write new modules for OTRS2?
Thanks for helping out.
[1] http://otrs/index.pl?Action=myModule&TicketID=10 -- Denis Jedig syneticon networks GbR http://syneticon.net/service/
_______________________________________________ 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

On Wednesday 08 March 2006 01:19, Bertagaz wrote:
Hi,
About documentation related to modules, there is: http://doc.otrs.org/1.3/en/html/, chapter 24 and 25
It's 1.3, but I don't think there are that much differences with 2.0.
I've read all that trying to understand how to get a new module to work, and with otrs2 it does not work. In there it says you only have to save the new module in Kernel/Modules/, and as Denis Jedig said, this does not work in otrs2. the documentation is very outdated.
Another usefull link is http://dev.otrs.org/
I believe this is outdated too, reading the source code for otrs2 is the best source of information on stuff like this.
Bert.
Daniel Dumitrache a écrit :
On Tuesday 07 March 2006 18:10, Denis Jedig wrote:
Greetings list,
I wonder where I can find a comprehensive documentation on how to write and install modules in OTRS2.
yeah, that would be so nice :)
I made some efforts mimicing some of the simpler internal modules but already ran into trouble by just renaming an existent module (namely AgentTicketCustomer) and trying to incorporate it into the MenuModule - it shows up in the ticket menu but calling the appropriate URL[1] throws me a "Can't locate Kernel/Modules/myModule.pm in @INC (@INC contains: ../../[..]"
I solved this by registering myModule in Kernel/Config/Files/ I did not perfectly understand where/how to register a module, but using the existing registered modules I managed to do it.
For example, I have a module that displays/modify(+other sstuff) some info on a customer, in Ticket.xml I copied the section for AgentCustomerInfo, and modified it to fit myModule (mostly renaming some xml keys/data). Here's an example, my module is named AgentLiveCustomer : $ grep -C 15 Live Ticket.xml </Setting> </ConfigItem> <ConfigItem Name="Frontend::Module###AgentTicketZoom" Required="0" Valid="1"> <Description Lang="en">Frontend module registration for the AgentTicketZoom object in the agent interface.</Description> <Description Lang="de">Frontendmodul-Registration des AgentTicketZoom-Objekts im Agent-Interface.</Description> <Group>Ticket</Group> <SubGroup>Frontend::Agent::ModuleRegistration</SubGroup> <Setting> <FrontendModuleReg> <Description>Ticket Zoom</Description> <Title>Zoom</Title> <NavBarName>Ticket</NavBarName> </FrontendModuleReg> </Setting> </ConfigItem> <ConfigItem Name="Frontend::Module###AgentLiveCustomer" Required="0" Valid="1"> <Group>Ticket</Group> <SubGroup>Frontend::Agent::ModuleRegistration</SubGroup> <Setting> <FrontendModuleReg> <Description>AgentLiveCustomer</Description> <Title>AgentLiveCustomer</Title> <NavBarName>AgentLiveCustomer</NavBarName> </FrontendModuleReg> </Setting> </ConfigItem> <ConfigItem Name="Frontend::Module###AgentCustomerInfo" Required="0" Valid="1"> <Group>Ticket</Group> <SubGroup>Frontend::Agent::ModuleRegistration</SubGroup> <Setting> <FrontendModuleReg> <Description>AgentCustomerInfo</Description> <Title>AgentCustomerInfo</Title> <NavBarName>AgentCustomerInfo</NavBarName> </FrontendModuleReg> </Setting> </ConfigItem> <ConfigItem Name="Frontend::Module###AgentTicketChat" Required="0" Valid="1">
and I've done the same thing for some other modules in Ticket.xml and Framework.xml, had no problems with it, it works
sometimes, after I manually edit one of the .xml files I must also enable the new module from: Admin->SysConfig->Ticket/Framework->Frontend::Admin/Agent::ModuleRe gistration
I do not understand why this interface does not offer the possibility to register new modules, only to edit already existing ones. It took me some time until I figured out how to add new ones by editing the xml.
the modules you will want to add, most probably will be somehow similar to existing ones (more or less), you should just grep Kernel/Config/Files/ for the existing module, and register the new one the same way the existing one is registered. this has always worked for me :)
So I wondered about a bunch of questions:
- if INC contains relative paths, which directory are they relative to? The one containing index.pl?
- where/how is INC assembled?
- why does it work for all kind of in-the-box modules but does not work for "mine"?
- why can't I find any documentation on how to write new modules for OTRS2?
Thanks for helping out.
[1] http://otrs/index.pl?Action=myModule&TicketID=10 -- Denis Jedig syneticon networks GbR http://syneticon.net/service/
_______________________________________________ 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
_______________________________________________ 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
-- Daniel Dumitrache -- This message was scanned for spam and viruses by BitDefender. For more information please visit http://www.bitdefender.com/

Hi, On Di, Mär 07, 2006 at 05:10:54 +0100, Denis Jedig wrote:
I wonder where I can find a comprehensive documentation on how to write and install modules in OTRS2.
We are still in the process to write a developper manual for OTRS. A draft can be found at http://www.otrs.com/~me/doc-developer/en/ Hope this draft already answers your questions :). Best regards, Christian -- ((otrs)) :: OTRS GmbH :: Europaring 4 :: D - 94315 Straubing Fon: +49 (0) 9421 1862 760 :: Fax: +49 (0) 9421 1862 769 http://www.otrs.com/ :: Communication with success!

On Wed, 8 Mar 2006 16:45:57 +0100 Christian Schoepplein wrote:
I wonder where I can find a comprehensive documentation on how to write and install modules in OTRS2.
Excellent, thank you. -- Denis Jedig syneticon networks GbR http://syneticon.net/service/
participants (4)
-
Bertagaz
-
Christian Schoepplein
-
Daniel Dumitrache
-
Denis Jedig