导入工具
一个插件,允许通过管理屏幕导入 CSV 文件。

Kevin Papst
You can import the following data:
- Timesheet
- Clockify (Timesheet)
- Project
- Customer
- Grandtotal (Customer)
- Kimai v1
Supported formats: JSON and CSV
Changelog
2.5.1 (03 Oct. 2023)
Compatibility: requires minimum Kimai 2.1.0
- Fixed: Column "Billable" is not correctly imported
2.5.0
Compatibility: requires minimum Kimai 2.1.0
- Use annotation type for routes
2.4.0
Compatibility: requires minimum Kimai 2.0.30
- Added: skip some validations during timesheet import
2.3.0
Compatibility: requires minimum Kimai 2.0.9
- Added: support for meta-fields via column "meta.XXX" for customers
- Added: support for meta-fields via column "meta.XXX" for projects
- Added: support for column "name" for customer
- Added: support for column "name" for project
- Added: importer highlights invalid column mapping
- Removed: "(plugin)" from permission header
2.2.3
Compatibility: requires minimum Kimai 2.0.9
- Fixed: System-Menu is not highlighted on tabs
2.2.2
Compatibility: requires minimum Kimai 2.0.9
- Added: hint for Clockify imports, that rate configurations are not imported
- Added: deactivate certain validation rules in "Import from Kimai v1" command
- Removed: use `Import` validator group
2.2.1
Compatibility: requires minimum Kimai 2.0.9
- Fixed: detect invalid encoding for fields Activity, Project, Description
- Added: better preview and import result status
2.2.0
Compatibility: requires minimum Kimai 2.0.9
Better use with Kimai 2.0.15 to utilize new `Import` validator group.
- Added: command option `skip-teams` to prevent team sync
- Added: command option `check-already-imported` to prevent duplicate database entries
- Fixed: `string` vs `int` comparison
- Fixed: `isset` vs `array_key_exists`
- Fixed: `is_int` vs `is_numeric`
2.1.6
Compatibility: requires minimum Kimai 2.0.9
- Fixed: prevent error if tag name exceeds 500 character
2.1.5
Compatibility: requires minimum Kimai 2.0.9
- Fixed: duration parsing
2.1.4
Compatibility: requires minimum Kimai 2.0.9
- Added: identify auto-deactivation during batch imports
2.1.3
Compatible with Kimai 2.0
- Fixed: deactivate listener for import, reducing extra DB queries (now 1k imported rows = ~7k queries, instead of 22k before)
- Fixed: improved boolean parsing
- strings `yes`, `true`, `1` = true
- everything else (e.g. `no`, `false`, `0`, empty string) = false
2.1.2
Compatible with Kimai 2.0
- Fixed: catch any Exception during CSV import
2.1.1
Compatible with Kimai 2.0
- Fixed: use UserService to create new user with default settings
2.1.0
Compatible with Kimai 2.0
- Added: new tabs for different importer
- Added: support creating user during import
- Added: new importer for Clockify migrations
- Added: option to choose between global and project-specific activities
- Fixed: Highlight errors
2.0.2
Compatible with Kimai 2.0
- Fixed: proper error handling for invalid date-times
- Fixed: proper error handling for unknown users
2.0.1
Compatible with Kimai 2.0
- Fixed: fixed import form validation
- Fixed: replaced "Sensio-FrameworkExtraBundle" with Symfony attribute
2.0
Compatible with Kimai 2.0
- Fixed: compatibility with 2.0
安装
复制文件
Extract the ZIP file and upload the included directory and all files to your Kimai installation to the new directory:
var/plugins/ImportBundle/
The file structure needs to look like this afterwards:
var/plugins/
├── ImportBundle
│ ├── ImportBundle.php
| └ ... more files and directories follow here ...
清除缓存
After uploading the files, Kimai needs to know about the new plugin. It will be found once the cache was re-built. Call these commands from the Kimai directory:
How to reload Kimai cache
bin/console kimai:reload --env=prod
It is not advised, but in case the above command fails you could try:
rm -r var/cache/prod/*
You might have to set file permissions afterwards:
Adjust file permission
You have to allow PHP (your webserver process) to write to
var/
and it subdirectories.
Here is an example for Debian/Ubuntu (to be executed inside the Kimai directory):
chown -R :www-data .
chmod -R g+r .
chmod -R g+rw var/
更新
Updating the plugin works exactly like the installation:
- Delete the directory
var/plugins/ImportBundle/
-
Execute all installation steps again:
- 复制文件
- 清除缓存
下表包含插件与所需的最低 Kimai 版本之间的比较。
Bundle 版本 | 最低 Kimai 版本 |
---|---|
2.5.0 - 2.5.1 | 2.1.0 |
2.4.0 | 2.0.30 |
2.1.4 - 2.3.0 | 2.0.9 |
2.0.0 - 2.1.3 | 2.0 |
1.2 | 1.22.0 |