From db7e0b56f24ae0b22d4b65d928af0157266dd788 Mon Sep 17 00:00:00 2001 From: snipe Date: Wed, 7 Nov 2018 17:36:34 -0800 Subject: [PATCH] Fixed department id on asset import with users --- app/Importer/Importer.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/Importer/Importer.php b/app/Importer/Importer.php index 85454d95a3..1daae94aa3 100644 --- a/app/Importer/Importer.php +++ b/app/Importer/Importer.php @@ -266,7 +266,8 @@ abstract class Importer $user_array = [ 'full_name' => $this->findCsvMatch($row, "full_name"), 'email' => $this->findCsvMatch($row, "email"), - 'manager_id'=> $this->fetchManager($this->findCsvMatch($row, 'manager_first_name'), $this->findCsvMatch($row, 'manager_last_name')) ? $this->fetchManager($this->findCsvMatch($row, 'manager_first_name'), $this->findCsvMatch($row, 'manager_last_name')) : null, + 'manager_id'=> $this->fetchManager($this->findCsvMatch($row, 'manager_first_name'), $this->findCsvMatch($row, 'manager_last_name')) ? $this->fetchManager($this->findCsvMatch($row, 'manager_first_name'), $this->findCsvMatch($row, 'manager_last_name')) : null, + 'department_id' => $this->createOrFetchDepartment($this->findCsvMatch($row, 'department')) ? $this->createOrFetchDepartment($this->findCsvMatch($row, 'department')) : null, 'username' => $this->findCsvMatch($row, "username"), 'activated' => $this->fetchHumanBoolean($this->findCsvMatch($row, 'activated')), ];