OTRS 6 - 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.

All trade names are used without the guarantee for their free use and are possibly registered trade marks. All products mentioned in this manual may be trade marks of the respective manufacturer.

The source code of this document can be found at github, in the repository doc-developer. Contributions are more than welcome. You can also help translating it to your language at Transifex.


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 Configuration Files
Accessing Config Options at Runtime
Database Mechanism
How it works
Database Drivers
Supported Databases
Log Mechanism
System Log
Communication Log
Date and Time
Introduction
Creation of a DateTime object
Time zones
Method summary
Deprecated package Kernel::System::Time
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
Creating Your Own Themes
Localization / Translation Mechanism
Marking translatable strings in the source files
Collecting translatable strings into the translation database
The translation process itself
Using the translated data from the code
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
Daemon And Scheduler
Dynamic Fields
Email Handling
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 5 to 6
From OTRS 4 to 5
From OTRS 3.3 to 4
5. Contributing to OTRS
Sending Contributions
Translating OTRS
Updating an existing translation
Adding a new frontend translation
Translating the Documentation
Code Style Guide
Perl
JavaScript
HTML
CSS
User Interface Design
Capitalization
Accessibility Guide
Accessibility Basics
Accessibility Standards
Implementation guidelines
Unit Tests
Creating a test file
Prerequisites for testing
Testing
Unit Test API
A. Additional Resources

List of Figures

1.1. OTRS Architecture
1.2. Generic Interface Architecture
3.1. Dashboard Widget
3.2. Dynamic Fields Architecture
3.3. Dynamic Field Interaction
3.4. Email Processing Flow
4.1. Package Life Cycle

List of Tables

4.1. Template Changes from OTRS 3.3 to 4