improve kimai v1 importer for projects without customer (#1543)

This commit is contained in:
Kevin Papst
2020-03-12 00:20:22 +01:00
committed by GitHub
parent 04a43378d8
commit e7458e76e1

View File

@@ -738,6 +738,14 @@ final class KimaiImporterCommand extends Command
foreach ($projects as $oldProject) {
$isActive = (bool) $oldProject['visible'] && !(bool) $oldProject['trash'];
if (!isset($this->customers[$oldProject['customerID']])) {
$io->error(
sprintf('Found project with unknown customer. Project ID: "%s", Name: "%s", Customer ID: "%s"', $oldProject['projectID'], $oldProject['name'], $oldProject['customerID'])
);
continue;
}
$customer = $this->customers[$oldProject['customerID']];
$name = $oldProject['name'];
if (empty($name)) {