OTRS 4 - Developer Manual

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
Useful Tools
Linking Expansion Modules
Architecture Overview
Directories
Files
Core Modules
Frontend Handle
Frontend Modules
CMD Frontend
Generic Interface Modules
Scheduler Task Handler Modules
Database
2. OTRS Internals - How it Works
Config Mechanism
Defaults.pm: OTRS Default Configuration
Automatically Generated Configuration Files
XML Config Options
Accessing Config Options at Runtime
Database Mechanism
How it works
Database Drivers
Supported Databases
Log Mechanism
Skins
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
Template File
Language File
Summary
Using the power of the OTRS module layers
Authentication and user management
Preferences
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
Package Porting
From OTRS 3.3 to 4
5. Contributing to OTRS
Sending Contributions
Translating OTRS
Updating an existing translation
Adding a new frontend translation
How it works internally (technical details)
Translating the Documentation
Code Style Guide
Perl
JavaScript
CSS
User Interface Design
Capitalization
Accessibility Guide
Accessibility Basics
Accessibility Standards
Implementation guidelines
Unit Tests
Creating a test file
Prerequisites for testing
Testing
UnitTest API
A. Additional Resources

List of Tables

4.1. Template Changes from OTRS 3.3 to 4