Live Demo: Try all plugins for OXID eShop, Shopware and osTicket by Markus Michalski live — no installation, no risk. demo.markus-michalski.net
The Subticket Manager plugin transforms osTicket's hidden parent/child ticket infrastructure into a fully functional, user-friendly feature. While osTicket provides the database structure (ticket_pid field) and API methods (isChild(), getPid()), it lacks any user interface or workflow automation.
This plugin provides a complete solution for managing hierarchical ticket relationships with visual indicators, workflow automation, and an intuitive interface for creating and managing subtickets.
What makes this plugin essential:
osTicket already has the technical foundation for parent/child tickets built into the core system, but it provides:
This plugin makes osTicket's hidden parent/child infrastructure actually usable for daily support operations.
ticket_pid), no core file changes required| Requirement | Version | Notes |
|---|---|---|
| osTicket | 1.18.x | Plugin uses osTicket's native ticket_pid infrastructure |
| PHP | 7.4+ | Recommended: PHP 8.1+ for best performance |
| jQuery | Any | Included in osTicket by default |
| Database | MariaDB 10.3+ or MySQL 5.7+ | Plugin creates additional metadata tables |
subticket-manager folder to /include/plugins/ on your osTicket serverFinal path: /path/to/osticket/include/plugins/subticket-manager/
cd /path/to/osticket/include/plugins
git clone https://github.com/markus-michalski/osticket-subticket-manager.git
scp/subtickets.php, scp/apps.php)scp/ajax-subticket.php)Check Admin Interface:
Check Ticket View:
Check Queue Indicators:
The plugin requires no configuration - it works out of the box using osTicket's native parent/child infrastructure.
All features are automatically enabled upon plugin activation:
Optional Settings:
SUBTICKET_DEBUG = true in class.SubticketPlugin.php (line 8) to enable detailed logging to /tmp/subticket-debug.logFrom Parent Ticket:
tickets.php?a=open&subticket_parent=15)model.created signal handler)Option 1: From Child Ticket
Option 2: From Parent Ticket
From Child Ticket:
ticket_pid set to NULL)From Parent Ticket:
Queue Lists:
queue-indicator.js) using AJAX endpointTicket View:
Parent Ticket (3 Sub-Tickets)
background: #e8f4f8; border-left: 4px solid #1e90ff)Navigate to: Applications → Subticket Hierarchies (scp/subtickets.php)
Features:
The plugin provides standalone AJAX endpoints for frontend operations:
Base URL: /scp/ajax-subticket.php
POST /scp/ajax-subticket.php?action=link
Content-Type: application/x-www-form-urlencoded
child_id=123&parent_number=181752&__CSRFToken__=abc123
Response:
{
"success": true,
"message": "Ticket linked successfully"
}
POST /scp/ajax-subticket.php?action=unlink
Content-Type: application/x-www-form-urlencoded
child_id=123&__CSRFToken__=abc123
Response:
{
"success": true,
"message": "Ticket unlinked successfully"
}
GET /scp/ajax-subticket.php?action=batch_parent_status&ticket_ids=15,16,17
Response:
{
"15": {"isParent": true, "childCount": 3},
"16": {"isParent": false, "childCount": 0},
"17": {"isParent": true, "childCount": 1}
}
Symptoms:
Check:
typeof jQuery // Should return "function"
SubticketPanel.debug = true
curl "http://osticket.local/scp/ajax-subticket.php?action=batch_parent_status&ticket_ids=15"
Symptoms:
Check:
/tmp/subticket-debug.logSymptoms:
Check:
tail -f /var/log/apache2/error.logExplanation:
The plugin prevents circular dependencies to maintain tree integrity. For example:
Solution: Review your ticket hierarchy and restructure as needed.
Plugin Structure:
subticket-manager/
├── plugin.php # Plugin metadata
├── class.SubticketPlugin.php # Main plugin class
├── config.php # Plugin configuration class
├── queue-decoration.php # Queue SQL enhancement
├── scp-files/ # Files deployed to scp/
├── js/ # Frontend JavaScript
├── services/ # Business logic layer
├── repositories/ # Database access layer
├── validation/ # Input validation
├── cache/ # Performance optimization
├── events/ # Signal handlers
└── tests/ # PHPUnit tests
Signal Hooks:
| Signal | Handler | Purpose |
|---|---|---|
object.view |
onTicketView() |
Inject panel HTML into ticket view |
model.created |
onTicketCreated() |
Auto-link newly created subtickets |
model.updated |
onTicketStatusChanged() |
Trigger auto-close workflow (Phase 4) |
isDescendant() checks ancestry up to 10 levelsidx_ticket_pid and idx_ticket_hierarchy for fast lookupsQ: Do I need to modify osTicket core files?
A: No! The plugin uses osTicket's native ticket_pid infrastructure and Signal system.
Q: Can I upgrade osTicket without breaking the plugin?
A: Yes, as long as osTicket maintains the ticket_pid field and Signal system.
Q: What's the maximum hierarchy depth?
A: Up to 10 levels of nesting (configurable).
Q: Can a ticket have multiple parents?
A: No. osTicket's ticket_pid field only supports one parent per ticket.
Q: Does this work with osTicket 1.17 or older?
A: No. The plugin requires osTicket 1.18.x.
Q: Is it compatible with PHP 8.x?
A: Yes! Tested with PHP 7.4, 8.0, 8.1, 8.2, and 8.3.
This Plugin is released under the GNU General Public License v2, compatible with osTicket core.
See LICENSE for details.
For questions or issues, please create an issue on GitHub:
Issue Tracker: https://github.com/markus-michalski/osticket-subticket-manager/issues
When reporting issues, please include:
php -v)Developed by Markus Michalski
Contributions welcome!
See CHANGELOG.md for version history.