Skip to content
Snippets Groups Projects
Commit 95e4c476 authored by aydreeihn's avatar aydreeihn
Browse files

Issue: Dumping Tickets From User View

This commit fixes an issue with how we export tickets from a specific User. Since changes were made to how Ticket exports are done, we needed to modify the call to export the Tickets from users.php as well since we were unintentionally sending the file name in where the csv headers should've been (variable added in dumpTickets method).
parent 96982469
Branches
Tags
No related merge requests found
......@@ -57,6 +57,10 @@ class Export {
$fields[$key] = $f;
$cdata[$key] = $f->getLocal('label');
}
if (!is_array($target))
$target = CustomQueue::getExportableFields() + $cdata;
// Reset the $sql query
$tickets = $sql->models()
->select_related('user', 'user__default_email', 'dept', 'staff',
......
......@@ -184,7 +184,7 @@ if ($user ) {
} elseif ($_REQUEST['a'] == 'export' && ($query=$_SESSION[':U:tickets'])) {
$filename = sprintf('%s-tickets-%s.csv',
$user->getName(), strftime('%Y%m%d'));
if (!Export::saveTickets($query, $filename, 'csv'))
if (!Export::saveTickets($query, '', $filename, 'csv'))
$errors['err'] = __('Unable to dump query results.')
.' '.__('Internal error occurred');
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment