Closed codiflow closed 8 months ago
Tested with this file: timesheet (1).csv
First import created 2 projects (as expected). Next import created 0 projects.
You could debug this place, maybe something is odd with the customer name (try commenting line 419)? https://github.com/kevinpapst/ImportBundle/blob/424279914bef11c5b10fe6a6e462383a7fb1b502/Importer/AbstractTimesheetImporter.php#L413-L421
That's right and that never was an issue. ð
But as soon as those projects are already existing in Kimai (having created them manually AND beforehand and not by an import) the bug appears ð
I really don't get it. I did some more tests on this issue as the dash does not seem to be the cause. But as soon as the project is named IT-Dienstleistungen
the issue appears. Also with a completely new created customer.
In my installation there are multiple projects named IT-Dienstleistungen
but they are all assigned to another customer and during my tests I could confirm that two projects with the same name on different customers are not triggering this.
Just tested, only 4 rows are imported if I create the projects manually before. Add a working test-case CSV please, otherwise I am not putting more of lifetime into this.
I'm working on it â just a few minutes :-)
Posting at the same time usually is weird. Take your time, it is Saturday evening anyway...
This is my project list with a test customer Testkunde
and one letter stripped from the end of IT-Dienstleistungen
so it is only IT-Dienstleistunge
:
This is the CSV file where the import works:
Date,From,To,Duration,Rate,User,Customer,Project,Activity,Description,Exported,Tags,HourlyRate,FixedRate,InternalRate
2024-01-05,15:15:00,15:30:00,900,,user@domain.de,Testkunde,IT-Dienstleistunge,Arbeitszeit,Some work description,0,,,,
2024-01-05,16:15:00,16:30:00,900,,user@domain.de,Testkunde,IT-Dienstleistunge,Arbeitszeit,Some work description,0,,,,
Result â all fine:
Changing the name to IT-Dienstleistungen
in Kimai now (I also noticed that they all get the same color â don't know if thats a hint helping to track this down) and copying it to the clipboard:
Pasting it to the CSV file and checking twice that there are no spaces before/after the string.
This is the CSV file where the import is creating a new project:
Date,From,To,Duration,Rate,User,Customer,Project,Activity,Description,Exported,Tags,HourlyRate,FixedRate,InternalRate
2024-01-05,15:15:00,15:30:00,900,,user@domain.de,Testkunde,IT-Dienstleistungen,Arbeitszeit,Some work description,0,,,,
2024-01-05,16:15:00,16:30:00,900,,user@domain.de,Testkunde,IT-Dienstleistungen,Arbeitszeit,Some work description,0,,,,
Result - project is being created although it already exists:
Alright, with that test case, I could reproduce. Already have an idea, not sure if it is 100% fixable. I hope in the real world, there are no two customer with the same name...
Great to hear that and glad that I could be of some help here ð
I work around it by just renaming the project temporarily for the import and renaming it back afterwards. As I've just a few customers to import the additional efford is acceptable.
By the way: THANKS for this great piece of software. It's a pleasure to use it ðĨ°
I hope in the real world, there are no two customer with the same name...
As long as people don't use first and last name as customer names this should not be the case ðĪŠ
If that's not fixable a note in the importer would be enough I think. Every migration needs some manual adjustments so I don't think all edge cases must be addressed at any time by the software.
Describe the issue
This is just a small bug which I tested with a recent installation of Kimai Docker, with the newest Importer plugin version and with the CSV import. Don't know if the JSON import is affected too.
If the project name contains a dash (e.g. like in the German word
IT-Dienstleistungen
) the Importer plugin always creates a new project for all timesheet entries with this name on each import.What I did: I precreated a project named
IT-Dienstleistungen
in Kimai and specified the same project name in my CSV file. But the Importer always creates a new project namedIT-Dienstleistungen
which is linked to the specific customer for every import (not every record).As soon as I remove the dash from the precreated project name and adjust the CSV file accordingly it behaves correctly and appends the records to the already existing project in Kimai.
Kimai version
2.9.0
How do you run Kimai?
Docker