diff --git a/app/Http/Controllers/Api/AssetsController.php b/app/Http/Controllers/Api/AssetsController.php index 707668d6d6..ef89f948ae 100644 --- a/app/Http/Controllers/Api/AssetsController.php +++ b/app/Http/Controllers/Api/AssetsController.php @@ -199,12 +199,18 @@ class AssetsController extends Controller break; default: - if ($settings->show_archived_in_list!='1') { + if ((!$request->has('status_id')) && ($settings->show_archived_in_list!='1')) { // terrible workaround for complex-query Laravel bug in fulltext $assets->join('status_labels AS status_alias',function ($join) { $join->on('status_alias.id', "=", "assets.status_id") ->where('status_alias.archived', '=', 0); }); + + // If there is a status ID, don't take show_archived_in_list into consideration + } else { + $assets->join('status_labels AS status_alias',function ($join) { + $join->on('status_alias.id', "=", "assets.status_id"); + }); } } diff --git a/app/Http/Controllers/UsersController.php b/app/Http/Controllers/UsersController.php index 4a8ba70e7d..27f18adf88 100755 --- a/app/Http/Controllers/UsersController.php +++ b/app/Http/Controllers/UsersController.php @@ -1068,7 +1068,7 @@ class UsersController extends Controller // Open output stream $handle = fopen('php://output', 'w'); - User::with('assets', 'accessories', 'consumables', 'licenses', 'manager', 'groups', 'userloc', 'company','throttle')->orderBy('created_at', 'DESC')->chunk(500, function($users) use($handle) { + User::with('assets', 'accessories', 'consumables', 'department', 'licenses', 'manager', 'groups', 'userloc', 'company','throttle')->orderBy('created_at', 'DESC')->chunk(500, function($users) use($handle) { $headers=[ // strtolower to prevent Excel from trying to open it as a SYLK file strtolower(trans('general.id')), @@ -1080,6 +1080,7 @@ class UsersController extends Controller trans('admin/users/table.email'), trans('admin/users/table.manager'), trans('admin/users/table.location'), + trans('general.department'), trans('general.assets'), trans('general.licenses'), trans('general.accessories'), @@ -1110,6 +1111,7 @@ class UsersController extends Controller $user->email, ($user->manager) ? $user->manager->present()->fullName() : '', ($user->userloc) ? $user->userloc->name : '', + ($user->department) ? $user->department->name : '', $user->assets->count(), $user->licenses->count(), $user->accessories->count(), diff --git a/config/version.php b/config/version.php index bd6b54fc6c..5cb0bc392e 100644 --- a/config/version.php +++ b/config/version.php @@ -1,10 +1,10 @@ 'v4.1.11-pre', - 'full_app_version' => 'v4.1.11-pre - build 3299-g3acf5f7', - 'build_version' => '3299', + 'full_app_version' => 'v4.1.11-pre - build 3307-gf06852f', + 'build_version' => '3307', 'prerelease_version' => '', - 'hash_version' => 'g3acf5f7', - 'full_hash' => 'v4.1.11-pre-47-g3acf5f7', + 'hash_version' => 'gf06852f', + 'full_hash' => 'v4.1.11-pre-55-gf06852f', 'branch' => 'master', );