From 57cdc517cda0eb4ae1958322244f437c72187b6b Mon Sep 17 00:00:00 2001 From: Adam Konner Date: Tue, 6 Sep 2016 01:14:21 -0400 Subject: [PATCH] Fix bug with missing entries I noticed a bug where a small handful of my time entries were mysteriously and silently not being synced to Redmine. I traced it to this line and found this solved the problem for me. --- app/models/toggl_api_service.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/toggl_api_service.rb b/app/models/toggl_api_service.rb index 00de3c1..cde7c3c 100644 --- a/app/models/toggl_api_service.rb +++ b/app/models/toggl_api_service.rb @@ -19,7 +19,7 @@ def get_toggl_entries # if user has setup workspace, use entries for those workspaces. If no workspace is setup, use all get_latest_toggl_entries_api_response('time_entries').map { |entry| - if entry["description"] =~ /\s*#(\d+)\s*/ && !entry["stop"].nil? && !entry["stop"].empty? && + if entry["description"] =~ /\s*#(\d+)\s*/ && entry["duration"] > 0 && (@toggl_workspace.blank? || workspace_ids.include?(entry['wid'])) TogglAPIEntry.new(entry["id"],