Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Import timesheets using console fails to process tags #1877

Closed
synaestic opened this issue Aug 7, 2020 · 4 comments
Closed

Import timesheets using console fails to process tags #1877

synaestic opened this issue Aug 7, 2020 · 4 comments
Labels
Milestone

Comments

@synaestic
Copy link
Contributor

I've tried to import timesheets but the import command doesn't handle the entries in the "Tags" field properly and throws an exception.

How to reproduce:

  1. Add two timesheets with tags.
  2. Export as CSV.
  3. Delete the last line "","","","[00]:00","0","0","","","","","","","","",""
  4. Import the file
Kimai importer: Timesheets
==========================

                                                                                                                        
 [ERROR] Failed importing timesheet row 2 with: An exception occurred while executing 'INSERT INTO kimai2_tags (name,   
         color) VALUES (?, ?)' with params ["my tag", null]:                                                            
                                                                                                                        
         SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'my tag' for key 'UNIQ_27CAF54C5E237E06'

For me it seems the tag progression at src/Command/ImportTimesheetCommand.php#L311 lacks a TagRepository::findIdsByTagNameList implementation.

@kevinpapst
Copy link
Member

Thanks @synaestic for posting the issue.

Seems you already identified the issue and fix: are you up for a fix / PR?

@kevinpapst kevinpapst added the bug label Aug 7, 2020
@synaestic
Copy link
Contributor Author

I hope to have some spare time soon.

@kevinpapst
Copy link
Member

Fixed in #1883 by @synaestic 👍 closing!

pinedev pushed a commit to pinedevstudio/kimai2 that referenced this issue Mar 23, 2021
@github-actions
Copy link

github-actions bot commented Oct 8, 2021

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. If you use Kimai on a daily basis, please consider donating to support further development of Kimai.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Development

No branches or pull requests

2 participants