Markus Michalski FAQ

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.

Deutsche Version

Back to overview

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

  1. Download the latest release from GitHub Releases.
  2. Extract the ZIP file.
  3. Upload the plugin folder to include/plugins/ on your osTicket server.

The package list of the repository (.releaseinclude) contains vendor/autoload.php and vendor/composer/. These are the files the plugin needs to load its classes from src/.

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 clone is not enough. The plugin loads its classes under src/ exclusively through vendor/autoload.php, and vendor/ is not part of the repository. Without composer install the 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

  1. Log in to the osTicket Admin Panel.
  2. Open Manage → Plugins.
  3. Select Subticket Manager, install the plugin and enable it.

On activation (enable()) the following happens:

The plugin does not create its database changes in enable() but on the first page request after activation (see Technical details).

apps.php is copied to scp/apps.php. If a file with that name already exists there (for example one shipped with osTicket), it is overwritten, and uninstalling the plugin deletes scp/apps.php. Back the file up before activating.

Verify the installation

  1. Ticket view: Open any ticket in the staff area. Above the ticket tabs the panel with the sections Parent Ticket and Child Tickets appears.
  2. Overview page: In the Applications area of the staff navigation you find the entry Subtickets.
  3. 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

  1. Replace the plugin files with the new version (on the Git route run git pull and composer install --no-dev).
  2. Open any osTicket page. On startup the plugin compares the version from plugin.php with the file scp/.subticket-deployed-version and copies the three files to scp/ again whenever the versions differ.
  3. 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():