Closed kporras07 closed 3 years ago
Thank you for reporting the issue. I'll take a look at it as soon as I have time.
I think I should finally have some time to get this fixed. Here is some more info I could use:
If I can have this info tomorrow, I'll try to work on it tomorrow night. Thanks 👍🏽
@jigarius description updated with details. Thanks for looking into this
The thing that can be fixed is the first entry, i.e. if a time entry on Toggl has more than 30s, T2R can round it up to the next minute. Example:
I'll try to get this done as soon as possible.
There is already an option to alter the rounding behavior, which I think might help you. In the Advanced options of Toggl 2 Redmine,
1
, i.e. 1
minute.@kporras07 please try out the branch associated with https://github.com/jigarius/toggl2redmine/pull/69 and let me know if it works for you.
Note to self: Gotta redo the JS someday so that it can be tested. Or maybe create a plugin that doesn't rely on Toggl.
It works as expected. Thanks :)
@kporras07 inspired by this issue, I rewrote most of the JavaScript. The good news is that the duration rounding mechanism is now unit-tested. If you have time, please feel free to test ~Toggl 2 Redmine v5.0.0~ Toggl 2 Redmine v4.4.0.
Hi @jigarius sure! Is it https://github.com/jigarius/toggl2redmine/releases/tag/v4.4.0-beta.1 the right tag? I can't find the one you linked
Yes. That is the right tag. I had to remove the other one.
I did some basic testing including rounding time entries and everything seems to be working. Do you want me to test something specific or is this enough?
As usual, thanks for all of the work in this great plugin!
Nothing specific. If everything works normally as earlier, that should suffice. I basically moved things around and used Typescript to do the JavaScript stuff.
Bug summary When there are multiple entries in Toggl with some seconds here and there, the totals between Redmine and Toggl don't match because of seconds leftovers.
To Reproduce Steps to reproduce the behavior:
Expected behavior Not sure.
Additional context I was looking into the code to try to add rounding option for 1 minute, then I found that L1741 in assets/javascripts/t2r.js is using "imprecise" to remove leftovers seconds.
2 possible changes with this:
Please let me know your thoughts on this. I would like to collaborate with a fix for this if that makes sense to you