osTicket - LimeSurvey Plugin
Automatically enroll ticket users in a LimeSurvey survey.
- Assumes osTicket v1.17+ is installed.
- Assumes PHP 7.4+ is being used on the server. (Earlier versions will cause crash when plugin enabled)
- Download master zip and extract into
/include/plugins/autocloser
- Install by selecting
Add New Plugin
from the Admin Panel => Manage => Plugins page, then selectInstall
next toAutomatic Surveys for Tickets
.
Before saving the server settings the Plugin will check if the configuration is valid, so be sure the LimeSurvey Remote API is enabled and successfully configured. A guide to set up this is at https://manual.limesurvey.org/RemoteControl_2_API.
This is an example of a successful configuration using a Test Survey Server:
Note: To use the Custom Event "ticket.closed"
, it needs to be defined in the class.ticket.php
file, inside the Ticket class, in the setStatus
method, before the break
statement at the end of the "Close Ticket" logic. This is because this event is not defined in the Original OSTicket code. At the moment, this is not included in the Plugin. The change in the setStatus function will be available like the next:
#.... Previous code ....
switch ($status->getState()) {
case 'closed':
// Check if ticket is closeable
$closeable = $force_close ? true : $this->isCloseable();
if ($closeable !== true)
$errors['err'] = $closeable ?: sprintf(__('%s cannot be closed'), __('This ticket'));
if ($errors)
return false;
$refer = $this->staff ?: $thisstaff;
$this->closed = $this->lastupdate = SqlFunction::NOW();
if ($thisstaff && $set_closing_agent)
$this->staff = $thisstaff;
// Clear overdue flags & due dates
$this->clearOverdue(false);
$ecb = function($t) use ($status) {
$t->logEvent('closed', array('status' => array($status->getId(), $status->getName())), null, 'closed');
$t->deleteDrafts();
};
=====> Signal::send('ticket.closed', $this);
break;
#.... Next Code ....
After a successfully enrollment action, the result of the action will be available in the Ticket as an Internal Note.