A free open source IT asset/license management system
Implement name
Marcus Mooreda092d43cf74
diff --git a/app/Http/Controllers/Reports/CustomComponentReportController.php b/app/Http/Controllers/Reports/CustomComponentReportController.phpindex 933beb2741..3efe54b340 100644--- a/app/Http/Controllers/Reports/CustomComponentReportController.php+++ b/app/Http/Controllers/Reports/CustomComponentReportController.php@@ -69,6 +69,7 @@ class CustomComponentReportController extends Controller$localConstraints = ['by_model_number' => 'components.model_number',+ 'by_name' => 'components.name',];foreach ($localConstraints as $formKey => $column) {@@ -134,6 +135,10 @@ class CustomComponentReportController extends Controller$row[] = $component?->location->name;}+ if ($request->filled('name')) {+ $row[] = $component->name;+ }+// CSV_ESCAPE_FORMULAS is set to false in the .envif (config('app.escape_formulas') === false) {fputcsv($handle, $row);diff --git a/tests/Feature/Reporting/Custom/CustomComponentReportTest.php b/tests/Feature/Reporting/Custom/CustomComponentReportTest.phpindex 6621d878f3..37b9cc54fb 100644--- a/tests/Feature/Reporting/Custom/CustomComponentReportTest.php+++ b/tests/Feature/Reporting/Custom/CustomComponentReportTest.php@@ -287,8 +287,6 @@ class CustomComponentReportTest extends TestCasepublic function test_limiting_by_name(){- $this->markTestIncomplete();-Component::factory()->create(['name' => 'RAM']);Component::factory()->create(['name' => 'Hard Drive']);