billable timesheets, inactive projects report, bookmark export search (#2503)

This commit is contained in:
Kevin Papst
2021-04-18 21:51:27 +02:00
committed by GitHub
parent 8664d94ea6
commit 0330f45c6a
97 changed files with 1516 additions and 664 deletions

View File

@@ -304,7 +304,9 @@ final class KimaiImporterCommand extends Command
$validationMessages = [];
try {
$usedEmails = [];
$userIds = [];
foreach ($users as $oldUser) {
$userIds[] = $oldUser['userID'];
if (empty($oldUser['mail'])) {
$validationMessages[] = sprintf('User "%s" with ID %s has no email', $oldUser['name'], $oldUser['userID']);
continue;
@@ -325,6 +327,15 @@ final class KimaiImporterCommand extends Command
$validationMessages[] = sprintf('Project "%s" with ID %s has unknown customer with ID %s', $oldProject['name'], $oldProject['projectID'], $oldProject['customerID']);
}
}
foreach ($rates as $oldRate) {
if ($oldRate['userID'] === null) {
continue;
}
if (!\in_array($oldRate['userID'], $userIds)) {
$validationMessages[] = sprintf('Unknown user with ID "%s" found for rate with project "%s" and activity "%s"', $oldRate['userID'], $oldRate['projectID'], $oldRate['activityID']);
}
}
} catch (Exception $ex) {
$validationMessages[] = $ex->getMessage();
}