Skip to Navigation

OTRS 2.4 - Developer Manual

René Bakker, Hauke Böttcher, Stefan Bedorf, Shawn Beasley, Jens Bothe, Udo Bretz, Martin Edenhofer, Manuel Hecht, Christopher Kuhn, André Mindermann, Henning Oschwald, Thomas Raith, 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.

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 and Windows Vista 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 MySQL AB.

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. Introduction
2. Coding Style Guide
2.1. Formatting
2.2. Naming
2.3. Source Code Header and Charset
2.4. Version Comments
2.5. Special comments
2.6. Restrictions for some functions
2.7. Perldoc
2.8. Length of lines
2.9. Core-Objects
2.9.1. Objects and their allocation
2.9.2. Using of the MainObject
2.9.3. Using of the EncodeObject
3. Architecture
3.1. Directories
3.2. Files
3.3. Core Modules
3.4. Frontend Handle
3.5. Frontend Modules
3.6. CMD Frontend
3.7. Database
4. Config Mechanism
4.1. Default Config
4.2. Custom Config
4.3. Accessing Config Options
4.4. XML Config Options
4.4.1. Types of XML Config Variables
4.4.2. String
4.4.3. Textarea
4.4.4. Options
4.4.5. Array
4.4.6. Hash
4.4.7. Hash with SubArray, SubHash
4.4.8. FrontendModuleReg (NavBar)
4.4.9. FrontendModuleReg (NavBarModule)
5. Database Mechanism
5.1. How it works
5.1.1. SQL
5.1.2. XML
5.2. Database Drivers
5.3. Supported Databases
6. Log Mechanism
6.1. Use and Syntax
6.2. Example
7. Module Format
7.1. Core Modules
7.1.1. Log Module
7.1.2. Output Filter
7.1.3. Stats Module
7.2. Frontend Modules
7.2.1. Dashboard Module
7.3. Old Module Descriptions
7.3.1. Auth Module
7.3.2. Notify Module
7.3.3. Navigation Module
7.3.4. Frontend Modules
7.3.5. Core Modules
7.3.6. Customer Auth Module
7.3.7. Customer User Module
7.3.8. Customer Navigation Module
7.3.9. Stats Module
7.3.10. Ticket Modules
8. Templates
8.1. Formatting
8.1.1. Comment
8.1.2. $Data{""}
8.1.3. $QData{""}
8.1.4. $LQData{""}
8.1.5. $Env{""}
8.1.6. $QEnv{""}
8.1.7. $Quote{""}
8.1.8. $Text{""}
8.1.9. $JSText{""}
8.1.10. $Config{""}
8.1.11. $Include{""}
8.1.12. Block
8.1.13. set
8.1.14. if
8.1.15. system-call
8.2. Example
9. Layout
9.1. CSS Style
9.1.1. View
9.1.2. Edit/New/Search
9.1.3. Overview/Search Result
9.1.4. Delete
9.2. Images
9.3. Special CSS Definitions
10. Language Translations
10.1. How it works
10.1.1. Default Framework Translation File
10.1.2. Frontend Translation File
10.1.3. Custom Translation File
10.2. Add a new default framework translation
11. Object Basics
11.1. Object Options
11.2. Search Options
11.3. Config Naming
11.4. Config File
11.5. NavBar Settings
11.6. Screen flow
12. Development Environment
12.1. Framework checkout (CVS)
12.2. Linking Expansion Modules
12.3. Necessary Actions after Linking
13. Writing an OTRS module for a new object
13.1. What we want to write
13.2. Default Config File
13.3. Frontend Module
13.4. Core Module
13.5. dtl Template File
13.6. Language File
13.7. Summary
14. Package Management
14.1. Package Distribution
14.1.1. Package Repository Index
14.2. Package Commands
14.2.1. Install
14.2.2. Uninstall
14.2.3. Upgrade
14.2.4. List
15. Package Building
15.1. Package Spec File
15.1.1. Name
15.1.2. Version
15.1.3. Framework
15.1.4. Vendor
15.1.5. URL
15.1.6. License
15.1.7. ChangeLog
15.1.8. Description
15.1.9. BuildHost
15.1.10. BuildDate
15.1.11. PackageRequired
15.1.12. ModuleRequired
15.1.13. OS (^M)
15.1.14. Filelist
15.1.15. DatabaseInstall
15.1.16. DatabaseUpgrade
15.1.17. DatabaseReinstall
15.1.18. DatabaseUninstall
15.1.19. IntroInstall
15.1.20. IntroUninstall
15.1.21. IntroReinstall
15.1.22. IntroUpgrade
15.1.23. CodeInstall
15.1.24. CodeUninstall
15.1.25. CodeReinstall
15.1.26. CodeUpgrade
15.2. Example .sopm
15.3. Package Build
15.4. Package Life Cycle - Install/Upgrade/Uninstall
16. Unit Tests
16.1. Creating a test file
16.2. Testing
16.3. True()
16.4. False()
16.5. Is()
A. Additional Ressources
A.1. OTRS.org
A.2. Online API Library
A.3. Developer Mailing List
A.4. Commercial Support