Skip to content

Commit

Permalink
Merge pull request #15828 from snipe/bug/sc-27500
Browse files Browse the repository at this point in the history
Fixed admin user not showing in download all activity report
  • Loading branch information
snipe authored Nov 15, 2024
2 parents 187e231 + e8d1093 commit 3fb543b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/Http/Controllers/ReportsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ public function postActivityReport(Request $request) : StreamedResponse
$executionTime = microtime(true) - $_SERVER['REQUEST_TIME_FLOAT'];
Log::debug('Added headers: '.$executionTime);

$actionlogs = Actionlog::with('item', 'user', 'target', 'location')
$actionlogs = Actionlog::with('item', 'user', 'target', 'location', 'adminuser')
->orderBy('created_at', 'DESC')
->chunk(20, function ($actionlogs) use ($handle) {
$executionTime = microtime(true) - $_SERVER['REQUEST_TIME_FLOAT'];
Expand All @@ -286,7 +286,7 @@ public function postActivityReport(Request $request) : StreamedResponse

$row = [
$actionlog->created_at,
($actionlog->admin) ? e($actionlog->admin->getFullNameAttribute()) : '',
($actionlog->adminuser) ? e($actionlog->adminuser->getFullNameAttribute()) : '',
$actionlog->present()->actionType(),
e($actionlog->itemType()),
($actionlog->itemType() == 'user') ? $actionlog->filename : $item_name,
Expand Down

0 comments on commit 3fb543b

Please sign in to comment.