hicknhack-software / redmine_hourglass

New Redmine plugin to enhance the time tracking abilities, reports and REST-API.
Other
78 stars 31 forks source link

Import from old Plugin not work #50

Closed xstable closed 7 years ago

xstable commented 7 years ago

I've installed Hourglass and try to import Data from Redmine Time Tracker Plugin.

I only got a no helping error-message:

Es gab einen Fehler, die Daten vom Redmine Time Tracker konnten nicht importiert werden. Haben sie diese vielleicht bereits importiert?

Means: An error occured. Data from Redmine Time Tracker couldn't imported. Do you have still import them.

So I doesn't have import them yet. How can I fix this?

xstable commented 7 years ago

Ok, I've seen there are some time-data in a List of Hourglass, But they are all unasigned (not assigned to an project or an task).

Even If I open an Ticket, track some time and stop the time-tracker.... this tracked time is not assigned to an Projekt or Task. Maybe all this cause of the same issue... even like my other bug of the App (https://github.com/hicknhack-software/redmine_hourglass/issues/51)

auswahl_249 auswahl_248

auswahl_251

jume-dev commented 7 years ago

Please check if the plugin is enabled on your project and you have set the appropriate access rights.

xstable commented 7 years ago

Yes, works like a charm. Thanks a lot.

xstable commented 7 years ago

I was a little bit to fast. Now the Project-Pulldown works. But the Imported data are not assigned to an project. Should I maybe wipe data of all houreglas-Database-Tables and do the import again (now that I've added the module to each projects)?

jume-dev commented 7 years ago

yes

xstable commented 7 years ago

Ok, I did this. But while importing I got again the message:

Es gab einen Fehler, die Daten vom Redmine Time Tracker konnten nicht importiert werden. Haben sie diese vielleicht bereits importiert?

Means: An error occured. Data from Redmine Time Tracker couldn't imported. Do you have still import them.

If I have a look at time_bookings, there appear only timebookings between 16.06.2014 and 23.10.2013.

Maybe cause of an Timeout the import is interrupted? Is there a way to manually import (while checking till which date was import and adding the following one?)

But It only takes about 13 seconds, till the Message appear. so I'm not sure if a timeout is the reason. BTW: It's hosting on uberspace.de.

jume-dev commented 7 years ago

Mhm, seems like we need to increase reporting for the import feature. Could you please check the logs, it should show you which records failed.

Btw how many entries do you have that you want to import?

At the moment there is now other way to import built in. If you are familiar with ruby, you can try fiddle with the code in lib/hourglass/redmine_time_tracker_import.rb

But iirc, you can just run the import over and over again, it should only import the ones not yet imported

xstable commented 7 years ago

Currently, 209 entries are imported, I have 1273 entries.

I'm only familiar with php, js, but no ruby, Still looked inside this plugin, but better touching nothing of it ^^

Have now clear the hourglass-db's and start over the import. I've attached the logs for this. logfile_hourglass.log

To run the import over and over didn't work. Run it surveral times, but still have 209 Entries.

jume-dev commented 7 years ago

mhm, that's all? there needs to be some sort of actual error otherwise the import wouldn't stop.

xstable commented 7 years ago

thats the whole logfile. Maybe I could send you timetracker db export and you try it at your development-system?

jume-dev commented 7 years ago

Sadly i can't provide more support than i did for now, cause i am really busy with another project for a customer. 2 solutions, as said in the other issue think about contacting us officially via our website or debug and try to find the error yourself. If i saw correctly, you have rubymine? Then place a breakpoint in hourglass_import_controller on Line 7 and inspect on the exception.

xstable commented 7 years ago

Don't know what rubymine is. Ruby is a deep black whole for me. Know nothing about it. A pitty, but seems I have to use the old timetracker-plugin (if it still work). Thanks for trying to help.

jume-dev commented 7 years ago

Well, you could use them in parallel annd use the new one only for new projects but that's probably a big hassle. Sorry, i couldn't help you more

xstable commented 7 years ago

Whats about if you told me in wich way the migration is done. I could manually via SQL-Statement parse the old entries into the new database.

xstable commented 7 years ago

Seems there where some entries in timetraker_bookings table, which breaks the script. I've delete those, following the las dataset which was impored and start over the import. This fill all entries at least.

ghost commented 6 years ago

I probably came across the same bug. The import task fails for a time_bookings record that has a shorter duration then the associated time_logs record. I opened a new issue for it and added more details from the rake error log.