request_action

Triggered after the execution of an action on a request.

Helpdesk

Input (passed by reference)

$params['request'] helpdeskRequest Request class instance.
$params['log'] helpdeskRequestLog Request history class instance.
… your plugin code …

Output

Helpdesk

Plugin code example

PHP

public function requestAction($params)
{
    $request = $params['request'];
    $log = $params['log'];

    $workflow = $request->getWorkflow();
    $action = $workflow->getActionById($log->action_id);

    waLog::log(
        sprintf_wp(
            'Action “%s” has been executed on request #%d.',
            $action->getName(),
            $request->id
        ),
        'myplugin.log'
    );
}