Subticket Manager: Installation
Install the Subticket Manager for osTicket: release ZIP or Git with Composer, activation, which files are copied to scp/, update, manual deployment, disabling and uninstalling.
Subticket Manager: Installation
Requirements
| Requirement | Value | Notes |
|---|---|---|
| osTicket | 1.18.x | The plugin class checks for osTicket 1.18.0 or newer and for the ticket_pid column in ost_ticket |
| PHP | 7.4 or newer | As required by composer.json; CI tests 7.4 to 8.3 |
| Database | MySQL or MariaDB | The README names MariaDB 10.3+ or MySQL 5.7+ |
| Table prefix | ost_ |
All SQL queries of the plugin use the fixed prefix ost_; any other prefix is not supported |
| File permissions | Write access to scp/ |
The plugin copies three files there on activation |
| Composer | Git route only | The plugin has no runtime dependencies but needs the autoloader generated by Composer |
Provide the plugin files
Release ZIP (recommended)
- Download the latest release from GitHub Releases.
- Extract the ZIP file.
- Upload the plugin folder to
include/plugins/on your osTicket server.
The package list of the repository (
.releaseinclude) containsvendor/autoload.phpandvendor/composer/. These are the files the plugin needs to load its classes fromsrc/.
Git clone with Composer
cd /path/to/osticket/include/plugins
git clone https://github.com/markus-michalski/osticket-subticket-manager.git subticket-manager
cd subticket-manager
composer install --no-dev
A plain
git cloneis not enough. The plugin loads its classes undersrc/exclusively throughvendor/autoload.php, andvendor/is not part of the repository. Withoutcomposer installthe plugin fails with a PHP error (class not found).
Folder name and duplicate installs
The name of the plugin folder is up to you. The AJAX handler locates the plugin class via include/plugins/*/class.SubticketPlugin.php. If the plugin exists more than once under include/plugins/ (for example an old copy with a different folder name), the handler answers with HTTP 500 and the message Multiple SubticketPlugin installations detected. Remove the extra copy in that case.
Activate the plugin
- Log in to the osTicket Admin Panel.
- Open Manage → Plugins.
- Select Subticket Manager, install the plugin and enable it.
On activation (enable()) the following happens:
- Singleton instance: The plugin is a singleton. If no instance exists yet,
enable()creates an active instance named after the plugin. - Copy files to
scp/:subtickets.php,ajax-subticket.phpandapps.phpfrom the plugin'sscp-files/folder are copied toscp/. Existing files with the same name are overwritten. - Errors: If
scp/is not writable or a source file is missing,enable()returns messages such asTarget directory not writable: ...orFailed to deploy file to scp/<file>.
The plugin does not create its database changes in enable() but on the first page request after activation (see Technical details).
apps.phpis copied toscp/apps.php. If a file with that name already exists there (for example one shipped with osTicket), it is overwritten, and uninstalling the plugin deletesscp/apps.php. Back the file up before activating.
Verify the installation
- Ticket view: Open any ticket in the staff area. Above the ticket tabs the panel with the sections Parent Ticket and Child Tickets appears.
- Overview page: In the Applications area of the staff navigation you find the entry Subtickets.
- Queue indicator: Link a ticket to a parent. In the ticket queue the parent ticket shows a code-fork icon with the number of children.
Update
- Replace the plugin files with the new version (on the Git route run
git pullandcomposer install --no-dev). - Open any osTicket page. On startup the plugin compares the version from
plugin.phpwith the filescp/.subticket-deployed-versionand copies the three files toscp/again whenever the versions differ. - Clear the browser cache so the current JavaScript files are loaded.
Manual deployment (fallback)
If scp/ is not writable for the web server, copy the files by hand:
cd /path/to/osticket
cp include/plugins/subticket-manager/scp-files/subtickets.php scp/subtickets.php
cp include/plugins/subticket-manager/scp-files/ajax-subticket.php scp/ajax-subticket.php
cp include/plugins/subticket-manager/scp-files/apps.php scp/apps.php
Disable
The plugin does not override disable(). Disabling leaves the three files in scp/ and all database changes in place. The panels, the queue indicator and auto-linking are inactive because the plugin no longer starts.
Uninstall
Deleting the plugin in the Admin Panel runs uninstall():
- The files
scp/subtickets.php,scp/ajax-subticket.php,scp/apps.phpandscp/.subticket-deployed-versionare removed. - If the option Remove Data on Uninstall is enabled, the plugin also drops its tables, the
versioncolumn and the two indexes (details under Configuration). - The relationships between tickets are always kept because they live in the osTicket column
ticket_pid.