Skip to content

Commit d8b1eec

Browse files
authored
Merge pull request #14197 from inietov/fixes/component_licenses_checkouts_not_displayed_in_asset_history
Fixes #14010 Adds Components and Licenses logs to Assets history view
2 parents b871813 + 5e4a337 commit d8b1eec

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

app/Http/Controllers/Api/ReportsController.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,12 @@ public function index(Request $request)
3333

3434
if (($request->filled('item_type')) && ($request->filled('item_id'))) {
3535
$actionlogs = $actionlogs->where('item_id', '=', $request->input('item_id'))
36-
->where('item_type', '=', 'App\\Models\\'.ucwords($request->input('item_type')));
36+
->where('item_type', '=', 'App\\Models\\'.ucwords($request->input('item_type')))
37+
->orWhere(function($query) use ($request)
38+
{
39+
$query->where('target_id', '=', $request->input('item_id'))
40+
->where('target_type', '=', 'App\\Models\\'.ucwords($request->input('item_type')));
41+
});
3742
}
3843

3944
if ($request->filled('action_type')) {

0 commit comments

Comments
 (0)