A free open source IT asset/license management system
Fixed #4952 - ignore show_archived setting when drilling down into specific ID
sniped2587337e4cc
diff --git a/app/Http/Controllers/Api/AssetsController.php b/app/Http/Controllers/Api/AssetsController.phpindex 707668d6d6..ef89f948ae 100644--- a/app/Http/Controllers/Api/AssetsController.php+++ b/app/Http/Controllers/Api/AssetsController.php@@ -199,12 +199,18 @@ class AssetsController extends Controllerbreak;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");+ });}}