Subticket Manager: Usage
Using subtickets in osTicket: create a subticket, link a ticket to a parent by ticket number, unlink, panel, badge, queue indicator, overview page and permissions.
Subticket Manager: Usage
The plugin works in the osTicket staff area. The user interface is the panel in the ticket view. The labels in the panel are in English.
The panel in the ticket view
On every ticket the plugin inserts a panel above the ticket tabs. It contains:
| Area | Content |
|---|---|
| Parent Ticket badge | Appears only if the ticket has at least one child, with the count, for example "Parent Ticket (3 Sub-Tickets)". The badge is moved below the ticket heading |
| Parent Ticket section | If the ticket has a parent: link with number and subject, status and the button Unlink from Parent. Otherwise "No parent ticket" and the button Link to Parent |
| Child Tickets section | List of children with number, subject, status and an Unlink button each, otherwise "No child tickets". Below it, always the Create Subticket button |
Children are sorted by creation date, oldest first.
Create a subticket
- Open the parent ticket.
- Click Create Subticket in the Child Tickets section.
- osTicket opens the new ticket form (
tickets.php?a=open&subticket_parent=<parent ID>). The form is not prefilled. - Fill in the form and create the ticket.
- After creation the plugin automatically sets the new ticket as a child of the parent.
The plugin stores the parent ID in the session as soon as you open the address with
subticket_parentand clears it only once a ticket has been created in that session. If you abandon the form and later create a different ticket, that ticket is linked to the parent as well. In that case open the form again via Create Subticket or unlink the ticket afterwards.
Link an existing ticket
- Open the ticket that should become a child.
- Click Link to Parent in the Parent Ticket section.
- Enter the ticket number of the parent in the dialog (digits only, at most ten). The plugin looks the value up in the
numbercolumn; the internal ticket ID does not work. - Confirm. After the success message the page reloads after one second.
The plugin rejects the link if:
- the ticket number does not exist,
- a ticket would be linked to itself,
- a loop would result (the chosen parent is already a descendant of the ticket, checked up to ten levels),
- you as an agent have no access to the department of the child ticket. Administrators are exempt.
When rejected, the panel shows the message Failed to link tickets. It does not state the exact reason.
Remove a link
- From the child: Click Unlink from Parent in the Parent Ticket section and confirm "Remove parent relationship?".
- From the parent: Click Unlink next to a child in the Child Tickets list and confirm "Remove this child ticket?".
Unlinking only sets the child's ticket_pid to NULL. The ticket itself is not deleted. Access to the department of the child ticket is required here as well.
Queue indicator
In the ticket queue, parent tickets show a code-fork icon with the number of children; the tooltip reads "N Sub-Ticket(s)". There are two mechanisms:
- JavaScript:
queue-indicator.jscollects the ticket IDs of the visible rows, queries them in one batch viaajax-subticket.php?action=batch_parent_statusand attaches the icon to the cell with the ticket link. The script only acts on pages whose path containstickets.php. - Queue decoration: The class
ParentTicketDecoration("Parent Ticket Icon") is a subclass ofQueueColumnAnnotation. With it the plugin provides osTicket with a decoration for queue columns that renders the same icon server-side.
Overview page
You reach the page scp/subtickets.php through the staff navigation entry Applications → Subtickets or through the tile on scp/apps.php. The page carries the heading "Ticket Hierarchies" and shows a table with the columns Parent-Ticket, Betreff (subject), Status, Anzahl (count) and Child-Tickets.
- The list is sorted by parent and creation date of the children and limited to 100 child tickets.
- The page is display-only. It has no search, no filter, no tree view and no functions for linking or unlinking.
- The page shows all relationships in the system, regardless of the logged-in agent's departments.
- The heading is in English; the intro text and table headers are hard-coded in German.
Permissions
The plugin does not create its own role permissions. It only distinguishes between a logged-in staff member and everyone else.
| Action | Requirement |
|---|---|
| See the panel, open the overview page, query children, queue indicator | Logged-in agent |
| Link, unlink | Logged-in agent with access to the department of the child ticket (administrators always), valid CSRF token |
| Create a subticket via AJAX | Logged-in agent with access to the department of the parent ticket, valid CSRF token |
Up to 100 AJAX requests per minute and session are allowed; after that the plugin blocks the session for 60 seconds (details under AJAX API).
What the plugin does not do
- It does not close parent tickets automatically, not even when all children are closed.
- There is no tree view, no batch operations and no search on the overview page.
- It does not move, close or assign tickets. The plugin only changes the
ticket_pidcolumn (and, through the AJAX interface, creates new tickets on request).