{"action":"created","comment":{"url":"https://api.github.com/repos/jenkinsci/workflow-support-plugin/pulls/comments/107764237","pull_request_review_id":28756168,"id":107764237,"diff_hunk":"@@ -133,7 +133,12 @@ public long getStartTimeInMillis() throws AbortException {\n \n     @Whitelisted\n     public long getDuration() throws AbortException {\n-\t return build().getDuration();\n+\t return System.currentTimeMillis() - build().getStartTimeInMillis();","path":"src/main/java/org/jenkinsci/plugins/workflow/support/steps/build/RunWrapper.java","position":5,"original_position":5,"commit_id":"fc61d8852021a4ddc471f7aa05c4e28c4f630f12","original_commit_id":"fc61d8852021a4ddc471f7aa05c4e28c4f630f12","user":{"login":"jglick","id":154109,"avatar_url":"https://avatars2.githubusercontent.com/u/154109?v=3","gravatar_id":"","url":"https://api.github.com/users/jglick","html_url":"https://github.com/jglick","followers_url":"https://api.github.com/users/jglick/followers","following_url":"https://api.github.com/users/jglick/following{/other_user}","gists_url":"https://api.github.com/users/jglick/gists{/gist_id}","starred_url":"https://api.github.com/users/jglick/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jglick/subscriptions","organizations_url":"https://api.github.com/users/jglick/orgs","repos_url":"https://api.github.com/users/jglick/repos","events_url":"https://api.github.com/users/jglick/events{/privacy}","received_events_url":"https://api.github.com/users/jglick/received_events","type":"User","site_admin":false},"body":"This will be wrong for a build other than `currentBuild`.","created_at":"2017-03-23T19:35:47Z","updated_at":"2017-03-23T19:35:56Z","html_url":"https://github.com/jenkinsci/workflow-support-plugin/pull/33#discussion_r107764237","pull_request_url":"https://api.github.com/repos/jenkinsci/workflow-support-plugin/pulls/33","_links":{"self":{"href":"https://api.github.com/repos/jenkinsci/workflow-support-plugin/pulls/comments/107764237"},"html":{"href":"https://github.com/jenkinsci/workflow-support-plugin/pull/33#discussion_r107764237"},"pull_request":{"href":"https://api.github.com/repos/jenkinsci/workflow-support-plugin/pulls/33"}}},"pull_request":{"url":"https://api.github.com/repos/jenkinsci/workflow-support-plugin/pulls/33","id":111684418,"html_url":"https://github.com/jenkinsci/workflow-support-plugin/pull/33","diff_url":"https://github.com/jenkinsci/workflow-support-plugin/pull/33.diff","patch_url":"https://github.com/jenkinsci/workflow-support-plugin/pull/33.patch","issue_url":"https://api.github.com/repos/jenkinsci/workflow-support-plugin/issues/33","number":33,"state":"open","locked":false,"title":"[FIXED JENKINS-42952] Make currentBuild.duration meaningful","user":{"login":"abayer","id":120218,"avatar_url":"https://avatars1.githubusercontent.com/u/120218?v=3","gravatar_id":"","url":"https://api.github.com/users/abayer","html_url":"https://github.com/abayer","followers_url":"https://api.github.com/users/abayer/followers","following_url":"https://api.github.com/users/abayer/following{/other_user}","gists_url":"https://api.github.com/users/abayer/gists{/gist_id}","starred_url":"https://api.github.com/users/abayer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abayer/subscriptions","organizations_url":"https://api.github.com/users/abayer/orgs","repos_url":"https://api.github.com/users/abayer/repos","events_url":"https://api.github.com/users/abayer/events{/privacy}","received_events_url":"https://api.github.com/users/abayer/received_events","type":"User","site_admin":false},"body":"[JENKINS-42952](https://issues.jenkins-ci.org/browse/JENKINS-42952)\r\n\r\n...and add currentBuild.durationString.\r\n\r\ncc @reviewbybees esp @jglick ","created_at":"2017-03-21T01:18:28Z","updated_at":"2017-03-23T19:35:56Z","closed_at":null,"merged_at":null,"merge_commit_sha":"424d284e74860b6b65332f2fb8be9c84bf4437a0","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/jenkinsci/workflow-support-plugin/pulls/33/commits","review_comments_url":"https://api.github.com/repos/jenkinsci/workflow-support-plugin/pulls/33/comments","review_comment_url":"https://api.github.com/repos/jenkinsci/workflow-support-plugin/pulls/comments{/number}","comments_url":"https://api.github.com/repos/jenkinsci/workflow-support-plugin/issues/33/comments","statuses_url":"https://api.github.com/repos/jenkinsci/workflow-support-plugin/statuses/fc61d8852021a4ddc471f7aa05c4e28c4f630f12","head":{"label":"abayer:jenkins-42952","ref":"jenkins-42952","sha":"fc61d8852021a4ddc471f7aa05c4e28c4f630f12","user":{"login":"abayer","id":120218,"avatar_url":"https://avatars1.githubusercontent.com/u/120218?v=3","gravatar_id":"","url":"https://api.github.com/users/abayer","html_url":"https://github.com/abayer","followers_url":"https://api.github.com/users/abayer/followers","following_url":"https://api.github.com/users/abayer/following{/other_user}","gists_url":"https://api.github.com/users/abayer/gists{/gist_id}","starred_url":"https://api.github.com/users/abayer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abayer/subscriptions","organizations_url":"https://api.github.com/users/abayer/orgs","repos_url":"https://api.github.com/users/abayer/repos","events_url":"https://api.github.com/users/abayer/events{/privacy}","received_events_url":"https://api.github.com/users/abayer/received_events","type":"User","site_admin":false},"repo":{"id":63088027,"name":"workflow-support-plugin","full_name":"abayer/workflow-support-plugin","owner":{"login":"abayer","id":120218,"avatar_url":"https://avatars1.githubusercontent.com/u/120218?v=3","gravatar_id":"","url":"https://api.github.com/users/abayer","html_url":"https://github.com/abayer","followers_url":"https://api.github.com/users/abayer/followers","following_url":"https://api.github.com/users/abayer/following{/other_user}","gists_url":"https://api.github.com/users/abayer/gists{/gist_id}","starred_url":"https://api.github.com/users/abayer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abayer/subscriptions","organizations_url":"https://api.github.com/users/abayer/orgs","repos_url":"https://api.github.com/users/abayer/repos","events_url":"https://api.github.com/users/abayer/events{/privacy}","received_events_url":"https://api.github.com/users/abayer/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/abayer/workflow-support-plugin","description":null,"fork":true,"url":"https://api.github.com/repos/abayer/workflow-support-plugin","forks_url":"https://api.github.com/repos/abayer/workflow-support-plugin/forks","keys_url":"https://api.github.com/repos/abayer/workflow-support-plugin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/abayer/workflow-support-plugin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/abayer/workflow-support-plugin/teams","hooks_url":"https://api.github.com/repos/abayer/workflow-support-plugin/hooks","issue_events_url":"https://api.github.com/repos/abayer/workflow-support-plugin/issues/events{/number}","events_url":"https://api.github.com/repos/abayer/workflow-support-plugin/events","assignees_url":"https://api.github.com/repos/abayer/workflow-support-plugin/assignees{/user}","branches_url":"https://api.github.com/repos/abayer/workflow-support-plugin/branches{/branch}","tags_url":"https://api.github.com/repos/abayer/workflow-support-plugin/tags","blobs_url":"https://api.github.com/repos/abayer/workflow-support-plugin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/abayer/workflow-support-plugin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/abayer/workflow-support-plugin/git/refs{/sha}","trees_url":"https://api.github.com/repos/abayer/workflow-support-plugin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/abayer/workflow-support-plugin/statuses/{sha}","languages_url":"https://api.github.com/repos/abayer/workflow-support-plugin/languages","stargazers_url":"https://api.github.com/repos/abayer/workflow-support-plugin/stargazers","contributors_url":"https://api.github.com/repos/abayer/workflow-support-plugin/contributors","subscribers_url":"https://api.github.com/repos/abayer/workflow-support-plugin/subscribers","subscription_url":"https://api.github.com/repos/abayer/workflow-support-plugin/subscription","commits_url":"https://api.github.com/repos/abayer/workflow-support-plugin/commits{/sha}","git_commits_url":"https://api.github.com/repos/abayer/workflow-support-plugin/git/commits{/sha}","comments_url":"https://api.github.com/repos/abayer/workflow-support-plugin/comments{/number}","issue_comment_url":"https://api.github.com/repos/abayer/workflow-support-plugin/issues/comments{/number}","contents_url":"https://api.github.com/repos/abayer/workflow-support-plugin/contents/{+path}","compare_url":"https://api.github.com/repos/abayer/workflow-support-plugin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/abayer/workflow-support-plugin/merges","archive_url":"https://api.github.com/repos/abayer/workflow-support-plugin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/abayer/workflow-support-plugin/downloads","issues_url":"https://api.github.com/repos/abayer/workflow-support-plugin/issues{/number}","pulls_url":"https://api.github.com/repos/abayer/workflow-support-plugin/pulls{/number}","milestones_url":"https://api.github.com/repos/abayer/workflow-support-plugin/milestones{/number}","notifications_url":"https://api.github.com/repos/abayer/workflow-support-plugin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/abayer/workflow-support-plugin/labels{/name}","releases_url":"https://api.github.com/repos/abayer/workflow-support-plugin/releases{/id}","deployments_url":"https://api.github.com/repos/abayer/workflow-support-plugin/deployments","created_at":"2016-07-11T17:28:34Z","updated_at":"2016-07-11T17:28:35Z","pushed_at":"2017-03-21T01:18:01Z","git_url":"git://github.com/abayer/workflow-support-plugin.git","ssh_url":"git@github.com:abayer/workflow-support-plugin.git","clone_url":"https://github.com/abayer/workflow-support-plugin.git","svn_url":"https://github.com/abayer/workflow-support-plugin","homepage":"https://wiki.jenkins-ci.org/display/JENKINS/Pipeline+Supporting+APIs+Plugin","size":382,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"jenkinsci:master","ref":"master","sha":"494446bf5962ff41726818224312079876c2cc70","user":{"login":"jenkinsci","id":107424,"avatar_url":"https://avatars3.githubusercontent.com/u/107424?v=3","gravatar_id":"","url":"https://api.github.com/users/jenkinsci","html_url":"https://github.com/jenkinsci","followers_url":"https://api.github.com/users/jenkinsci/followers","following_url":"https://api.github.com/users/jenkinsci/following{/other_user}","gists_url":"https://api.github.com/users/jenkinsci/gists{/gist_id}","starred_url":"https://api.github.com/users/jenkinsci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jenkinsci/subscriptions","organizations_url":"https://api.github.com/users/jenkinsci/orgs","repos_url":"https://api.github.com/users/jenkinsci/repos","events_url":"https://api.github.com/users/jenkinsci/events{/privacy}","received_events_url":"https://api.github.com/users/jenkinsci/received_events","type":"Organization","site_admin":false},"repo":{"id":55541308,"name":"workflow-support-plugin","full_name":"jenkinsci/workflow-support-plugin","owner":{"login":"jenkinsci","id":107424,"avatar_url":"https://avatars3.githubusercontent.com/u/107424?v=3","gravatar_id":"","url":"https://api.github.com/users/jenkinsci","html_url":"https://github.com/jenkinsci","followers_url":"https://api.github.com/users/jenkinsci/followers","following_url":"https://api.github.com/users/jenkinsci/following{/other_user}","gists_url":"https://api.github.com/users/jenkinsci/gists{/gist_id}","starred_url":"https://api.github.com/users/jenkinsci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jenkinsci/subscriptions","organizations_url":"https://api.github.com/users/jenkinsci/orgs","repos_url":"https://api.github.com/users/jenkinsci/repos","events_url":"https://api.github.com/users/jenkinsci/events{/privacy}","received_events_url":"https://api.github.com/users/jenkinsci/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/jenkinsci/workflow-support-plugin","description":null,"fork":false,"url":"https://api.github.com/repos/jenkinsci/workflow-support-plugin","forks_url":"https://api.github.com/repos/jenkinsci/workflow-support-plugin/forks","keys_url":"https://api.github.com/repos/jenkinsci/workflow-support-plugin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jenkinsci/workflow-support-plugin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jenkinsci/workflow-support-plugin/teams","hooks_url":"https://api.github.com/repos/jenkinsci/workflow-support-plugin/hooks","issue_events_url":"https://api.github.com/repos/jenkinsci/workflow-support-plugin/issues/events{/number}","events_url":"https://api.github.com/repos/jenkinsci/workflow-support-plugin/events","assignees_url":"https://api.github.com/repos/jenkinsci/workflow-support-plugin/assignees{/user}","branches_url":"https://api.github.com/repos/jenkinsci/workflow-support-plugin/branches{/branch}","tags_url":"https://api.github.com/repos/jenkinsci/workflow-support-plugin/tags","blobs_url":"https://api.github.com/repos/jenkinsci/workflow-support-plugin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jenkinsci/workflow-support-plugin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jenkinsci/workflow-support-plugin/git/refs{/sha}","trees_url":"https://api.github.com/repos/jenkinsci/workflow-support-plugin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jenkinsci/workflow-support-plugin/statuses/{sha}","languages_url":"https://api.github.com/repos/jenkinsci/workflow-support-plugin/languages","stargazers_url":"https://api.github.com/repos/jenkinsci/workflow-support-plugin/stargazers","contributors_url":"https://api.github.com/repos/jenkinsci/workflow-support-plugin/contributors","subscribers_url":"https://api.github.com/repos/jenkinsci/workflow-support-plugin/subscribers","subscription_url":"https://api.github.com/repos/jenkinsci/workflow-support-plugin/subscription","commits_url":"https://api.github.com/repos/jenkinsci/workflow-support-plugin/commits{/sha}","git_commits_url":"https://api.github.com/repos/jenkinsci/workflow-support-plugin/git/commits{/sha}","comments_url":"https://api.github.com/repos/jenkinsci/workflow-support-plugin/comments{/number}","issue_comment_url":"https://api.github.com/repos/jenkinsci/workflow-support-plugin/issues/comments{/number}","contents_url":"https://api.github.com/repos/jenkinsci/workflow-support-plugin/contents/{+path}","compare_url":"https://api.github.com/repos/jenkinsci/workflow-support-plugin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jenkinsci/workflow-support-plugin/merges","archive_url":"https://api.github.com/repos/jenkinsci/workflow-support-plugin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jenkinsci/workflow-support-plugin/downloads","issues_url":"https://api.github.com/repos/jenkinsci/workflow-support-plugin/issues{/number}","pulls_url":"https://api.github.com/repos/jenkinsci/workflow-support-plugin/pulls{/number}","milestones_url":"https://api.github.com/repos/jenkinsci/workflow-support-plugin/milestones{/number}","notifications_url":"https://api.github.com/repos/jenkinsci/workflow-support-plugin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jenkinsci/workflow-support-plugin/labels{/name}","releases_url":"https://api.github.com/repos/jenkinsci/workflow-support-plugin/releases{/id}","deployments_url":"https://api.github.com/repos/jenkinsci/workflow-support-plugin/deployments","created_at":"2016-04-05T19:59:11Z","updated_at":"2017-01-03T23:27:37Z","pushed_at":"2017-03-21T21:03:56Z","git_url":"git://github.com/jenkinsci/workflow-support-plugin.git","ssh_url":"git@github.com:jenkinsci/workflow-support-plugin.git","clone_url":"https://github.com/jenkinsci/workflow-support-plugin.git","svn_url":"https://github.com/jenkinsci/workflow-support-plugin","homepage":"https://wiki.jenkins-ci.org/display/JENKINS/Pipeline+Supporting+APIs+Plugin","size":385,"stargazers_count":3,"watchers_count":3,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":14,"mirror_url":null,"open_issues_count":5,"forks":14,"open_issues":5,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/jenkinsci/workflow-support-plugin/pulls/33"},"html":{"href":"https://github.com/jenkinsci/workflow-support-plugin/pull/33"},"issue":{"href":"https://api.github.com/repos/jenkinsci/workflow-support-plugin/issues/33"},"comments":{"href":"https://api.github.com/repos/jenkinsci/workflow-support-plugin/issues/33/comments"},"review_comments":{"href":"https://api.github.com/repos/jenkinsci/workflow-support-plugin/pulls/33/comments"},"review_comment":{"href":"https://api.github.com/repos/jenkinsci/workflow-support-plugin/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/jenkinsci/workflow-support-plugin/pulls/33/commits"},"statuses":{"href":"https://api.github.com/repos/jenkinsci/workflow-support-plugin/statuses/fc61d8852021a4ddc471f7aa05c4e28c4f630f12"}}}}
{"actor":{"display_login":"jglick"}}