OTRS 3.1 - Developer Manual

René Bakker, Hauke Böttcher, Stefan Bedorf, Shawn Beasley, Jens Bothe, Udo Bretz, Martin Edenhofer, Carlos Javier García, Martin Gruner, Manuel Hecht, Christopher Kuhn, André Mindermann, Henning Oschwald, Thomas Raith, Carlos Fernando Rodríguez, Stefan Rother, Burchard Steinbild.

This work is copyrighted by OTRS AG.

You may copy it in whole or in part as long as the copies retain this copyright statement.

The source code of this document can be found at github.

UNIX is a registered trademark of X/Open Company Limited. Linux is a registered trademark of Linus Torvalds.

MS-DOS, Windows, Windows 95, Windows 98, Windows NT, Windows 2000, Windows XP, Windows 2003, Windows Vista and Windows 7 are registered trademarks of Microsoft Corporation. Other trademarks and registered trademarks are: SUSE and YaST of SUSE Linux GmbH, Red Hat and Fedora are registered trademarks of Red Hat, Inc. Mandrake is a registered trademark of MandrakeSoft, SA. Debian is a registered trademark of Software in the Public Interest, Inc. MySQL and the MySQL Logo are registered trademarks of Oracle Corporation and/or its affiliates.

All trade names are used without the guarantee for their free use and are possibly registered trade marks.

OTRS AG essentially follows the notations of the manufacturers. Other products mentioned in this manual may be trademarks of the respective manufacturer.

Table of Contents

1. Getting Started
Development Environment
Framework checkout
Linking Expansion Modules
Necessary Actions after Linking
Architecture Overview
Core Modules
Frontend Handle
Frontend Modules
CMD Frontend
Generic Interface Modules
Scheduler Task Handler Modules
2. OTRS Internals - How it Works
Config Mechanism
Default Config
Custom Config
Accessing Config Options
XML Config Options
Database Mechanism
How it works
Database Drivers
Supported Databases
Log Mechanism
Use and Syntax
Skin Basics
How skins are loaded
Creating a New Skin
The CSS and JavaScript "Loader"
How it works
Basic Operation
Configuring the Loader: JavaScript
Configuring the Loader: CSS
Templating Mechanism
Template Commands
Using a template file
3. How to Extend OTRS
Writing a new OTRS frontend module
What we want to write
Default Config File
Frontend Module
Core Module
dtl Template File
Language File
Using the power of the OTRS module layers
Authentication and user management
Other core functions
Frontend Modules
Generic Interface Modules
Scheduler Task Handler Modules
Dynamic Fields
Old Module Descriptions
4. How to Publish Your OTRS Extensions
Package Management
Package Distribution
Package Commands
Package Building
Package Spec File
Example .sopm
Package Build
Package Life Cycle - Install/Upgrade/Uninstall
5. Contributing to OTRS
Sending Contributions
Translating OTRS
How it works
Updating an existing translation
Adding a new frontend translation
Translating the Documentation
Code Style Guide
User Interface Design
Accessibility Guide
Accessibility Basics
Accessibility Standards
Implementation guidelines
Unit Tests
Creating a test file
A. Additional Resources
Online API Library
Developer Mailing List
Commercial Support