Couldn't find Issue with id=XXX
pokurek opened this issue · 5 comments
Hi, I have a problem with creating a new time entry.
When I run rake toggl:update RAILS_ENV=production, I get rake aborted! Couldn't find Issue with id=XXX
That is right. Issue with number XXX doesn't exist in redmine. But is it necessary to get en error and stop creating all other time entries?
I don't know Ruby, so sorry for missing patch.
I guess, there could be a condition testing missing redmine issue in the create_time_entry(), before TimeEntry.new() is called, or error handling for Issue.find(). Don't know.
Thank you, good job.
Hey there! Thanks for a praise :)
Could you please try if branch «issue3_fix» works fine for you?
Hi SkyWriter!
It looks good. You have small typo there:
- puts "Issue #{toggle_entry.issue_id} has not been found in Redmine. Skipping."
+ puts "Issue #{toggl_entry.issue_id} has not been found in Redmine. Skipping."
After that, it will work as expected.
Thank you.
Oops :) Gotta write some tests, I reckon. I'll fix that one and merge.
👍 Great. Have a nice day :)
I've commited the fix, you should now pull in "master".
Thanks for reporting the bug ;-)