billable timesheets, inactive projects report, bookmark export search (#2503)
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user