Skip to content

Commit 8b5c676

Browse files
committed
deactivate more validators in Kimai1 importer
1 parent 37eee0f commit 8b5c676

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ Compatibility: requires minimum Kimai 2.17.0
44

55
- Make it simpler to increase max row and file size
66
- Allow 4MB upload file size and 5000 rows per file
7+
- Deactivate timesheet validators during Kimai1 import: TimesheetLockdown, TimesheetLongRunning, TimesheetZeroDuration
78

89
## Version 2.13.0
910

ImportBundle.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@
1212

1313
use App\Plugin\PluginInterface;
1414
use App\Validator\Constraints\TimesheetDeactivated;
15+
use App\Validator\Constraints\TimesheetLockdown;
16+
use App\Validator\Constraints\TimesheetLongRunning;
17+
use App\Validator\Constraints\TimesheetZeroDuration;
1518
use Symfony\Component\HttpKernel\Bundle\Bundle;
1619

1720
class ImportBundle extends Bundle implements PluginInterface
@@ -23,5 +26,8 @@ class ImportBundle extends Bundle implements PluginInterface
2326
'kimai-timesheet-87', 'kimai-timesheet-88', 'kimai-timesheet-89', // timesheet deactivated before 2.0.16
2427
'kimai-timesheet-deactivated-activity', 'kimai-timesheet-deactivated-project', 'kimai-timesheet-deactivated-customer', // timesheet deactivated after 2.0.16
2528
TimesheetDeactivated::DISABLED_ACTIVITY_ERROR, TimesheetDeactivated::DISABLED_PROJECT_ERROR, TimesheetDeactivated::DISABLED_CUSTOMER_ERROR, // timesheet deactivated current codes
29+
TimesheetLockdown::PERIOD_LOCKED, // lockdown is obviously not necessary to check here
30+
TimesheetLongRunning::LONG_RUNNING, TimesheetLongRunning::MAXIMUM, TimesheetZeroDuration::ZERO_DURATION_ERROR, // if this was allowed in the past, it should be imported
31+
2632
];
2733
}

0 commit comments

Comments
 (0)