{"action":"created","comment":{"url":"https://api.github.com/repos/wisetime-io/wisetime-jira-connector/pulls/comments/239067718","pull_request_review_id":181746503,"id":239067718,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzOTA2NzcxOA==","diff_hunk":"@@ -4,27 +4,38 @@\n \n package io.wisetime.connector.jira.database;\n \n+import com.google.common.annotations.VisibleForTesting;\n import com.google.common.collect.ImmutableList;\n+import com.google.common.collect.ImmutableSet;\n import com.google.inject.Inject;\n \n+import org.apache.commons.lang3.tuple.Pair;\n import org.codejargon.fluentjdbc.api.FluentJdbcException;\n import org.codejargon.fluentjdbc.api.mapper.Mappers;\n import org.codejargon.fluentjdbc.api.query.Query;\n \n import java.time.ZoneId;\n+import java.time.ZonedDateTime;\n+import java.time.format.DateTimeFormatter;\n import java.util.List;\n import java.util.Optional;\n+import java.util.Set;\n+import java.util.stream.Collectors;\n \n+import io.wisetime.connector.jira.models.ImmutableIssue;\n import io.wisetime.connector.jira.models.Issue;\n import io.wisetime.connector.jira.models.Worklog;\n \n /**\n  * Simple, unsophisticated access to the Jira database.\n  *\n  * @author shane.xie@practiceinsight.io\n+ * @author alvin.llobrera@practiceinsight.io\n  */\n public class JiraDb {\n \n+  private final DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern(\"yyyy-MM-dd HH:mm:ss\");","path":"src/main/java/io/wisetime/connector/jira/database/JiraDb.java","position":34,"original_position":34,"commit_id":"6f9146dc73809424bd5eb0371d6620b785e9affd","original_commit_id":"6f9146dc73809424bd5eb0371d6620b785e9affd","user":{"login":"vyshane","id":305692,"node_id":"MDQ6VXNlcjMwNTY5Mg==","avatar_url":"https://avatars2.githubusercontent.com/u/305692?v=4","gravatar_id":"","url":"https://api.github.com/users/vyshane","html_url":"https://github.com/vyshane","followers_url":"https://api.github.com/users/vyshane/followers","following_url":"https://api.github.com/users/vyshane/following{/other_user}","gists_url":"https://api.github.com/users/vyshane/gists{/gist_id}","starred_url":"https://api.github.com/users/vyshane/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vyshane/subscriptions","organizations_url":"https://api.github.com/users/vyshane/orgs","repos_url":"https://api.github.com/users/vyshane/repos","events_url":"https://api.github.com/users/vyshane/events{/privacy}","received_events_url":"https://api.github.com/users/vyshane/received_events","type":"User","site_admin":false},"body":"Looks like timezone isn't saved in the worklog created date column. Do you know if Jira expects the datetime to be in UTC?","created_at":"2018-12-05T13:42:56Z","updated_at":"2018-12-05T13:49:44Z","html_url":"https://github.com/wisetime-io/wisetime-jira-connector/pull/2#discussion_r239067718","pull_request_url":"https://api.github.com/repos/wisetime-io/wisetime-jira-connector/pulls/2","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/wisetime-io/wisetime-jira-connector/pulls/comments/239067718"},"html":{"href":"https://github.com/wisetime-io/wisetime-jira-connector/pull/2#discussion_r239067718"},"pull_request":{"href":"https://api.github.com/repos/wisetime-io/wisetime-jira-connector/pulls/2"}}},"pull_request":{"url":"https://api.github.com/repos/wisetime-io/wisetime-jira-connector/pulls/2","id":236134666,"node_id":"MDExOlB1bGxSZXF1ZXN0MjM2MTM0NjY2","html_url":"https://github.com/wisetime-io/wisetime-jira-connector/pull/2","diff_url":"https://github.com/wisetime-io/wisetime-jira-connector/pull/2.diff","patch_url":"https://github.com/wisetime-io/wisetime-jira-connector/pull/2.patch","issue_url":"https://api.github.com/repos/wisetime-io/wisetime-jira-connector/issues/2","number":2,"state":"open","locked":false,"title":"Feature/wt 6210 implement jiradb class and tests","user":{"login":"alvinllobrera","id":2143795,"node_id":"MDQ6VXNlcjIxNDM3OTU=","avatar_url":"https://avatars1.githubusercontent.com/u/2143795?v=4","gravatar_id":"","url":"https://api.github.com/users/alvinllobrera","html_url":"https://github.com/alvinllobrera","followers_url":"https://api.github.com/users/alvinllobrera/followers","following_url":"https://api.github.com/users/alvinllobrera/following{/other_user}","gists_url":"https://api.github.com/users/alvinllobrera/gists{/gist_id}","starred_url":"https://api.github.com/users/alvinllobrera/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alvinllobrera/subscriptions","organizations_url":"https://api.github.com/users/alvinllobrera/orgs","repos_url":"https://api.github.com/users/alvinllobrera/repos","events_url":"https://api.github.com/users/alvinllobrera/events{/privacy}","received_events_url":"https://api.github.com/users/alvinllobrera/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-12-05T11:12:26Z","updated_at":"2018-12-05T13:49:43Z","closed_at":null,"merged_at":null,"merge_commit_sha":"67cb527270bcf6c545c7a0b0a305fc6875b72f64","assignee":null,"assignees":[],"requested_reviewers":[{"login":"sukolenvo","id":25821770,"node_id":"MDQ6VXNlcjI1ODIxNzcw","avatar_url":"https://avatars3.githubusercontent.com/u/25821770?v=4","gravatar_id":"","url":"https://api.github.com/users/sukolenvo","html_url":"https://github.com/sukolenvo","followers_url":"https://api.github.com/users/sukolenvo/followers","following_url":"https://api.github.com/users/sukolenvo/following{/other_user}","gists_url":"https://api.github.com/users/sukolenvo/gists{/gist_id}","starred_url":"https://api.github.com/users/sukolenvo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sukolenvo/subscriptions","organizations_url":"https://api.github.com/users/sukolenvo/orgs","repos_url":"https://api.github.com/users/sukolenvo/repos","events_url":"https://api.github.com/users/sukolenvo/events{/privacy}","received_events_url":"https://api.github.com/users/sukolenvo/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/wisetime-io/wisetime-jira-connector/pulls/2/commits","review_comments_url":"https://api.github.com/repos/wisetime-io/wisetime-jira-connector/pulls/2/comments","review_comment_url":"https://api.github.com/repos/wisetime-io/wisetime-jira-connector/pulls/comments{/number}","comments_url":"https://api.github.com/repos/wisetime-io/wisetime-jira-connector/issues/2/comments","statuses_url":"https://api.github.com/repos/wisetime-io/wisetime-jira-connector/statuses/6f9146dc73809424bd5eb0371d6620b785e9affd","head":{"label":"wisetime-io:feature/WT-6210-implement-jiradb-class-and-tests","ref":"feature/WT-6210-implement-jiradb-class-and-tests","sha":"6f9146dc73809424bd5eb0371d6620b785e9affd","user":{"login":"wisetime-io","id":43595872,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQzNTk1ODcy","avatar_url":"https://avatars2.githubusercontent.com/u/43595872?v=4","gravatar_id":"","url":"https://api.github.com/users/wisetime-io","html_url":"https://github.com/wisetime-io","followers_url":"https://api.github.com/users/wisetime-io/followers","following_url":"https://api.github.com/users/wisetime-io/following{/other_user}","gists_url":"https://api.github.com/users/wisetime-io/gists{/gist_id}","starred_url":"https://api.github.com/users/wisetime-io/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wisetime-io/subscriptions","organizations_url":"https://api.github.com/users/wisetime-io/orgs","repos_url":"https://api.github.com/users/wisetime-io/repos","events_url":"https://api.github.com/users/wisetime-io/events{/privacy}","received_events_url":"https://api.github.com/users/wisetime-io/received_events","type":"Organization","site_admin":false},"repo":{"id":159441972,"node_id":"MDEwOlJlcG9zaXRvcnkxNTk0NDE5NzI=","name":"wisetime-jira-connector","full_name":"wisetime-io/wisetime-jira-connector","private":false,"owner":{"login":"wisetime-io","id":43595872,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQzNTk1ODcy","avatar_url":"https://avatars2.githubusercontent.com/u/43595872?v=4","gravatar_id":"","url":"https://api.github.com/users/wisetime-io","html_url":"https://github.com/wisetime-io","followers_url":"https://api.github.com/users/wisetime-io/followers","following_url":"https://api.github.com/users/wisetime-io/following{/other_user}","gists_url":"https://api.github.com/users/wisetime-io/gists{/gist_id}","starred_url":"https://api.github.com/users/wisetime-io/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wisetime-io/subscriptions","organizations_url":"https://api.github.com/users/wisetime-io/orgs","repos_url":"https://api.github.com/users/wisetime-io/repos","events_url":"https://api.github.com/users/wisetime-io/events{/privacy}","received_events_url":"https://api.github.com/users/wisetime-io/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/wisetime-io/wisetime-jira-connector","description":"WiseTime Jira Connector","fork":false,"url":"https://api.github.com/repos/wisetime-io/wisetime-jira-connector","forks_url":"https://api.github.com/repos/wisetime-io/wisetime-jira-connector/forks","keys_url":"https://api.github.com/repos/wisetime-io/wisetime-jira-connector/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wisetime-io/wisetime-jira-connector/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wisetime-io/wisetime-jira-connector/teams","hooks_url":"https://api.github.com/repos/wisetime-io/wisetime-jira-connector/hooks","issue_events_url":"https://api.github.com/repos/wisetime-io/wisetime-jira-connector/issues/events{/number}","events_url":"https://api.github.com/repos/wisetime-io/wisetime-jira-connector/events","assignees_url":"https://api.github.com/repos/wisetime-io/wisetime-jira-connector/assignees{/user}","branches_url":"https://api.github.com/repos/wisetime-io/wisetime-jira-connector/branches{/branch}","tags_url":"https://api.github.com/repos/wisetime-io/wisetime-jira-connector/tags","blobs_url":"https://api.github.com/repos/wisetime-io/wisetime-jira-connector/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wisetime-io/wisetime-jira-connector/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wisetime-io/wisetime-jira-connector/git/refs{/sha}","trees_url":"https://api.github.com/repos/wisetime-io/wisetime-jira-connector/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wisetime-io/wisetime-jira-connector/statuses/{sha}","languages_url":"https://api.github.com/repos/wisetime-io/wisetime-jira-connector/languages","stargazers_url":"https://api.github.com/repos/wisetime-io/wisetime-jira-connector/stargazers","contributors_url":"https://api.github.com/repos/wisetime-io/wisetime-jira-connector/contributors","subscribers_url":"https://api.github.com/repos/wisetime-io/wisetime-jira-connector/subscribers","subscription_url":"https://api.github.com/repos/wisetime-io/wisetime-jira-connector/subscription","commits_url":"https://api.github.com/repos/wisetime-io/wisetime-jira-connector/commits{/sha}","git_commits_url":"https://api.github.com/repos/wisetime-io/wisetime-jira-connector/git/commits{/sha}","comments_url":"https://api.github.com/repos/wisetime-io/wisetime-jira-connector/comments{/number}","issue_comment_url":"https://api.github.com/repos/wisetime-io/wisetime-jira-connector/issues/comments{/number}","contents_url":"https://api.github.com/repos/wisetime-io/wisetime-jira-connector/contents/{+path}","compare_url":"https://api.github.com/repos/wisetime-io/wisetime-jira-connector/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wisetime-io/wisetime-jira-connector/merges","archive_url":"https://api.github.com/repos/wisetime-io/wisetime-jira-connector/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wisetime-io/wisetime-jira-connector/downloads","issues_url":"https://api.github.com/repos/wisetime-io/wisetime-jira-connector/issues{/number}","pulls_url":"https://api.github.com/repos/wisetime-io/wisetime-jira-connector/pulls{/number}","milestones_url":"https://api.github.com/repos/wisetime-io/wisetime-jira-connector/milestones{/number}","notifications_url":"https://api.github.com/repos/wisetime-io/wisetime-jira-connector/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wisetime-io/wisetime-jira-connector/labels{/name}","releases_url":"https://api.github.com/repos/wisetime-io/wisetime-jira-connector/releases{/id}","deployments_url":"https://api.github.com/repos/wisetime-io/wisetime-jira-connector/deployments","created_at":"2018-11-28T04:07:57Z","updated_at":"2018-12-05T11:11:09Z","pushed_at":"2018-12-05T11:28:14Z","git_url":"git://github.com/wisetime-io/wisetime-jira-connector.git","ssh_url":"git@github.com:wisetime-io/wisetime-jira-connector.git","clone_url":"https://github.com/wisetime-io/wisetime-jira-connector.git","svn_url":"https://github.com/wisetime-io/wisetime-jira-connector","homepage":null,"size":121,"stargazers_count":4,"watchers_count":4,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":1,"watchers":4,"default_branch":"master"}},"base":{"label":"wisetime-io:master","ref":"master","sha":"737190ce46fe1de6cca693aa9b5e043f8e982bde","user":{"login":"wisetime-io","id":43595872,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQzNTk1ODcy","avatar_url":"https://avatars2.githubusercontent.com/u/43595872?v=4","gravatar_id":"","url":"https://api.github.com/users/wisetime-io","html_url":"https://github.com/wisetime-io","followers_url":"https://api.github.com/users/wisetime-io/followers","following_url":"https://api.github.com/users/wisetime-io/following{/other_user}","gists_url":"https://api.github.com/users/wisetime-io/gists{/gist_id}","starred_url":"https://api.github.com/users/wisetime-io/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wisetime-io/subscriptions","organizations_url":"https://api.github.com/users/wisetime-io/orgs","repos_url":"https://api.github.com/users/wisetime-io/repos","events_url":"https://api.github.com/users/wisetime-io/events{/privacy}","received_events_url":"https://api.github.com/users/wisetime-io/received_events","type":"Organization","site_admin":false},"repo":{"id":159441972,"node_id":"MDEwOlJlcG9zaXRvcnkxNTk0NDE5NzI=","name":"wisetime-jira-connector","full_name":"wisetime-io/wisetime-jira-connector","private":false,"owner":{"login":"wisetime-io","id":43595872,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQzNTk1ODcy","avatar_url":"https://avatars2.githubusercontent.com/u/43595872?v=4","gravatar_id":"","url":"https://api.github.com/users/wisetime-io","html_url":"https://github.com/wisetime-io","followers_url":"https://api.github.com/users/wisetime-io/followers","following_url":"https://api.github.com/users/wisetime-io/following{/other_user}","gists_url":"https://api.github.com/users/wisetime-io/gists{/gist_id}","starred_url":"https://api.github.com/users/wisetime-io/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wisetime-io/subscriptions","organizations_url":"https://api.github.com/users/wisetime-io/orgs","repos_url":"https://api.github.com/users/wisetime-io/repos","events_url":"https://api.github.com/users/wisetime-io/events{/privacy}","received_events_url":"https://api.github.com/users/wisetime-io/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/wisetime-io/wisetime-jira-connector","description":"WiseTime Jira Connector","fork":false,"url":"https://api.github.com/repos/wisetime-io/wisetime-jira-connector","forks_url":"https://api.github.com/repos/wisetime-io/wisetime-jira-connector/forks","keys_url":"https://api.github.com/repos/wisetime-io/wisetime-jira-connector/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wisetime-io/wisetime-jira-connector/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wisetime-io/wisetime-jira-connector/teams","hooks_url":"https://api.github.com/repos/wisetime-io/wisetime-jira-connector/hooks","issue_events_url":"https://api.github.com/repos/wisetime-io/wisetime-jira-connector/issues/events{/number}","events_url":"https://api.github.com/repos/wisetime-io/wisetime-jira-connector/events","assignees_url":"https://api.github.com/repos/wisetime-io/wisetime-jira-connector/assignees{/user}","branches_url":"https://api.github.com/repos/wisetime-io/wisetime-jira-connector/branches{/branch}","tags_url":"https://api.github.com/repos/wisetime-io/wisetime-jira-connector/tags","blobs_url":"https://api.github.com/repos/wisetime-io/wisetime-jira-connector/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wisetime-io/wisetime-jira-connector/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wisetime-io/wisetime-jira-connector/git/refs{/sha}","trees_url":"https://api.github.com/repos/wisetime-io/wisetime-jira-connector/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wisetime-io/wisetime-jira-connector/statuses/{sha}","languages_url":"https://api.github.com/repos/wisetime-io/wisetime-jira-connector/languages","stargazers_url":"https://api.github.com/repos/wisetime-io/wisetime-jira-connector/stargazers","contributors_url":"https://api.github.com/repos/wisetime-io/wisetime-jira-connector/contributors","subscribers_url":"https://api.github.com/repos/wisetime-io/wisetime-jira-connector/subscribers","subscription_url":"https://api.github.com/repos/wisetime-io/wisetime-jira-connector/subscription","commits_url":"https://api.github.com/repos/wisetime-io/wisetime-jira-connector/commits{/sha}","git_commits_url":"https://api.github.com/repos/wisetime-io/wisetime-jira-connector/git/commits{/sha}","comments_url":"https://api.github.com/repos/wisetime-io/wisetime-jira-connector/comments{/number}","issue_comment_url":"https://api.github.com/repos/wisetime-io/wisetime-jira-connector/issues/comments{/number}","contents_url":"https://api.github.com/repos/wisetime-io/wisetime-jira-connector/contents/{+path}","compare_url":"https://api.github.com/repos/wisetime-io/wisetime-jira-connector/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wisetime-io/wisetime-jira-connector/merges","archive_url":"https://api.github.com/repos/wisetime-io/wisetime-jira-connector/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wisetime-io/wisetime-jira-connector/downloads","issues_url":"https://api.github.com/repos/wisetime-io/wisetime-jira-connector/issues{/number}","pulls_url":"https://api.github.com/repos/wisetime-io/wisetime-jira-connector/pulls{/number}","milestones_url":"https://api.github.com/repos/wisetime-io/wisetime-jira-connector/milestones{/number}","notifications_url":"https://api.github.com/repos/wisetime-io/wisetime-jira-connector/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wisetime-io/wisetime-jira-connector/labels{/name}","releases_url":"https://api.github.com/repos/wisetime-io/wisetime-jira-connector/releases{/id}","deployments_url":"https://api.github.com/repos/wisetime-io/wisetime-jira-connector/deployments","created_at":"2018-11-28T04:07:57Z","updated_at":"2018-12-05T11:11:09Z","pushed_at":"2018-12-05T11:28:14Z","git_url":"git://github.com/wisetime-io/wisetime-jira-connector.git","ssh_url":"git@github.com:wisetime-io/wisetime-jira-connector.git","clone_url":"https://github.com/wisetime-io/wisetime-jira-connector.git","svn_url":"https://github.com/wisetime-io/wisetime-jira-connector","homepage":null,"size":121,"stargazers_count":4,"watchers_count":4,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":1,"watchers":4,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/wisetime-io/wisetime-jira-connector/pulls/2"},"html":{"href":"https://github.com/wisetime-io/wisetime-jira-connector/pull/2"},"issue":{"href":"https://api.github.com/repos/wisetime-io/wisetime-jira-connector/issues/2"},"comments":{"href":"https://api.github.com/repos/wisetime-io/wisetime-jira-connector/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/wisetime-io/wisetime-jira-connector/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/wisetime-io/wisetime-jira-connector/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/wisetime-io/wisetime-jira-connector/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/wisetime-io/wisetime-jira-connector/statuses/6f9146dc73809424bd5eb0371d6620b785e9affd"}},"author_association":"NONE"}}
{"actor":{"display_login":"vyshane"}}