{"action":"created","comment":{"url":"https://api.github.com/repos/jenkinsci/blueocean-plugin/pulls/comments/81233067","pull_request_review_id":2228620,"id":81233067,"diff_hunk":"@@ -49,6 +56,20 @@ public BlueRun get(String name) {\n                 }\n             }\n             if (run == null) {\n+                // JENKINS-38540 - To make this consistent with the activity API, check the queue\n+                String queuedRun = findRunInQueue(name);\n+                if (queuedRun != null) {\n+                    try {\n+                        StaplerResponse rsp = Stapler.getCurrentResponse();\n+                        // Send a 302, temporary redirect. substring to fix double slash\n+                        rsp.sendRedirect(Links.ensureTrailingSlash(Jenkins.getInstance().getRootUrl() + pipeline.getLink().toString().substring(1) + \"queue/\" + queuedRun));","path":"blueocean-rest-impl/src/main/java/io/jenkins/blueocean/service/embedded/rest/RunContainerImpl.java","position":35,"original_position":35,"commit_id":"4481fcb7ce0ad74c0799e55eef6332bdeaca42ef","original_commit_id":"4481fcb7ce0ad74c0799e55eef6332bdeaca42ef","user":{"login":"tfennelly","id":429311,"avatar_url":"https://avatars.githubusercontent.com/u/429311?v=3","gravatar_id":"","url":"https://api.github.com/users/tfennelly","html_url":"https://github.com/tfennelly","followers_url":"https://api.github.com/users/tfennelly/followers","following_url":"https://api.github.com/users/tfennelly/following{/other_user}","gists_url":"https://api.github.com/users/tfennelly/gists{/gist_id}","starred_url":"https://api.github.com/users/tfennelly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tfennelly/subscriptions","organizations_url":"https://api.github.com/users/tfennelly/orgs","repos_url":"https://api.github.com/users/tfennelly/repos","events_url":"https://api.github.com/users/tfennelly/events{/privacy}","received_events_url":"https://api.github.com/users/tfennelly/received_events","type":"User","site_admin":false},"body":"Seems to duplicate code you also added in `QueueContainerImpl.java` ?","created_at":"2016-09-29T20:57:57Z","updated_at":"2016-09-29T21:02:59Z","html_url":"https://github.com/jenkinsci/blueocean-plugin/pull/543#discussion_r81233067","pull_request_url":"https://api.github.com/repos/jenkinsci/blueocean-plugin/pulls/543","_links":{"self":{"href":"https://api.github.com/repos/jenkinsci/blueocean-plugin/pulls/comments/81233067"},"html":{"href":"https://github.com/jenkinsci/blueocean-plugin/pull/543#discussion_r81233067"},"pull_request":{"href":"https://api.github.com/repos/jenkinsci/blueocean-plugin/pulls/543"}}},"pull_request":{"url":"https://api.github.com/repos/jenkinsci/blueocean-plugin/pulls/543","id":87331949,"html_url":"https://github.com/jenkinsci/blueocean-plugin/pull/543","diff_url":"https://github.com/jenkinsci/blueocean-plugin/pull/543.diff","patch_url":"https://github.com/jenkinsci/blueocean-plugin/pull/543.patch","issue_url":"https://api.github.com/repos/jenkinsci/blueocean-plugin/issues/543","number":543,"state":"open","locked":false,"title":"[FIX JENKINS-38540] - make queue and run consistent with activity","user":{"login":"kzantow","id":3009477,"avatar_url":"https://avatars.githubusercontent.com/u/3009477?v=3","gravatar_id":"","url":"https://api.github.com/users/kzantow","html_url":"https://github.com/kzantow","followers_url":"https://api.github.com/users/kzantow/followers","following_url":"https://api.github.com/users/kzantow/following{/other_user}","gists_url":"https://api.github.com/users/kzantow/gists{/gist_id}","starred_url":"https://api.github.com/users/kzantow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kzantow/subscriptions","organizations_url":"https://api.github.com/users/kzantow/orgs","repos_url":"https://api.github.com/users/kzantow/repos","events_url":"https://api.github.com/users/kzantow/events{/privacy}","received_events_url":"https://api.github.com/users/kzantow/received_events","type":"User","site_admin":false},"body":"# Description\r\n\r\nSee [JENKINS-38540](https://issues.jenkins-ci.org/browse/JENKINS-38540).\r\n\r\nDidn't bother with tests on this because I have a feeling @vivek may not like this change.\r\n\r\nTo test: set queue size to 0, build a freestyle job to get a queued item, go to the BO UI click the queued item, then refresh the browser, you should still have a queued item page rather than a not found.\r\n\r\nThis also fixes [JENKINS-37843](https://issues.jenkins-ci.org/browse/JENKINS-37843)\r\n\r\n# Submitter checklist\r\n- [x] Link to JIRA ticket in description, if appropriate.\r\n- [x] Change is code complete and matches issue description\r\n- [x] Appropriate unit or acceptance tests or explanation to why this change has no tests\r\n- [x] Reviewer's manual test instructions provided in PR description. See Reviewer's first task below.\r\n- [ ] ~~Ran Acceptance Test Harness against PR changes.~~\r\n\r\n# Reviewer checklist\r\n- [ ] Run the changes and verified the change matches the issue description\r\n- [ ] Reviewed the code\r\n- [ ] Verified that the appropriate tests have been written or valid explanation given\r\n\r\n@jenkinsci/code-reviewers @reviewbybees \r\n\r\n","created_at":"2016-09-29T15:05:54Z","updated_at":"2016-09-29T21:02:59Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a57798cdddb62446257f4c63efd64dcb0cd22dd2","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/jenkinsci/blueocean-plugin/pulls/543/commits","review_comments_url":"https://api.github.com/repos/jenkinsci/blueocean-plugin/pulls/543/comments","review_comment_url":"https://api.github.com/repos/jenkinsci/blueocean-plugin/pulls/comments{/number}","comments_url":"https://api.github.com/repos/jenkinsci/blueocean-plugin/issues/543/comments","statuses_url":"https://api.github.com/repos/jenkinsci/blueocean-plugin/statuses/4481fcb7ce0ad74c0799e55eef6332bdeaca42ef","head":{"label":"kzantow:JENKINS-38540-redirect-queues-and-runs","ref":"JENKINS-38540-redirect-queues-and-runs","sha":"4481fcb7ce0ad74c0799e55eef6332bdeaca42ef","user":{"login":"kzantow","id":3009477,"avatar_url":"https://avatars.githubusercontent.com/u/3009477?v=3","gravatar_id":"","url":"https://api.github.com/users/kzantow","html_url":"https://github.com/kzantow","followers_url":"https://api.github.com/users/kzantow/followers","following_url":"https://api.github.com/users/kzantow/following{/other_user}","gists_url":"https://api.github.com/users/kzantow/gists{/gist_id}","starred_url":"https://api.github.com/users/kzantow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kzantow/subscriptions","organizations_url":"https://api.github.com/users/kzantow/orgs","repos_url":"https://api.github.com/users/kzantow/repos","events_url":"https://api.github.com/users/kzantow/events{/privacy}","received_events_url":"https://api.github.com/users/kzantow/received_events","type":"User","site_admin":false},"repo":{"id":60725922,"name":"blueocean-plugin","full_name":"kzantow/blueocean-plugin","owner":{"login":"kzantow","id":3009477,"avatar_url":"https://avatars.githubusercontent.com/u/3009477?v=3","gravatar_id":"","url":"https://api.github.com/users/kzantow","html_url":"https://github.com/kzantow","followers_url":"https://api.github.com/users/kzantow/followers","following_url":"https://api.github.com/users/kzantow/following{/other_user}","gists_url":"https://api.github.com/users/kzantow/gists{/gist_id}","starred_url":"https://api.github.com/users/kzantow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kzantow/subscriptions","organizations_url":"https://api.github.com/users/kzantow/orgs","repos_url":"https://api.github.com/users/kzantow/repos","events_url":"https://api.github.com/users/kzantow/events{/privacy}","received_events_url":"https://api.github.com/users/kzantow/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/kzantow/blueocean-plugin","description":"Blue Ocean UI app","fork":true,"url":"https://api.github.com/repos/kzantow/blueocean-plugin","forks_url":"https://api.github.com/repos/kzantow/blueocean-plugin/forks","keys_url":"https://api.github.com/repos/kzantow/blueocean-plugin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kzantow/blueocean-plugin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kzantow/blueocean-plugin/teams","hooks_url":"https://api.github.com/repos/kzantow/blueocean-plugin/hooks","issue_events_url":"https://api.github.com/repos/kzantow/blueocean-plugin/issues/events{/number}","events_url":"https://api.github.com/repos/kzantow/blueocean-plugin/events","assignees_url":"https://api.github.com/repos/kzantow/blueocean-plugin/assignees{/user}","branches_url":"https://api.github.com/repos/kzantow/blueocean-plugin/branches{/branch}","tags_url":"https://api.github.com/repos/kzantow/blueocean-plugin/tags","blobs_url":"https://api.github.com/repos/kzantow/blueocean-plugin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kzantow/blueocean-plugin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kzantow/blueocean-plugin/git/refs{/sha}","trees_url":"https://api.github.com/repos/kzantow/blueocean-plugin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kzantow/blueocean-plugin/statuses/{sha}","languages_url":"https://api.github.com/repos/kzantow/blueocean-plugin/languages","stargazers_url":"https://api.github.com/repos/kzantow/blueocean-plugin/stargazers","contributors_url":"https://api.github.com/repos/kzantow/blueocean-plugin/contributors","subscribers_url":"https://api.github.com/repos/kzantow/blueocean-plugin/subscribers","subscription_url":"https://api.github.com/repos/kzantow/blueocean-plugin/subscription","commits_url":"https://api.github.com/repos/kzantow/blueocean-plugin/commits{/sha}","git_commits_url":"https://api.github.com/repos/kzantow/blueocean-plugin/git/commits{/sha}","comments_url":"https://api.github.com/repos/kzantow/blueocean-plugin/comments{/number}","issue_comment_url":"https://api.github.com/repos/kzantow/blueocean-plugin/issues/comments{/number}","contents_url":"https://api.github.com/repos/kzantow/blueocean-plugin/contents/{+path}","compare_url":"https://api.github.com/repos/kzantow/blueocean-plugin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kzantow/blueocean-plugin/merges","archive_url":"https://api.github.com/repos/kzantow/blueocean-plugin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kzantow/blueocean-plugin/downloads","issues_url":"https://api.github.com/repos/kzantow/blueocean-plugin/issues{/number}","pulls_url":"https://api.github.com/repos/kzantow/blueocean-plugin/pulls{/number}","milestones_url":"https://api.github.com/repos/kzantow/blueocean-plugin/milestones{/number}","notifications_url":"https://api.github.com/repos/kzantow/blueocean-plugin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kzantow/blueocean-plugin/labels{/name}","releases_url":"https://api.github.com/repos/kzantow/blueocean-plugin/releases{/id}","deployments_url":"https://api.github.com/repos/kzantow/blueocean-plugin/deployments","created_at":"2016-06-08T19:46:31Z","updated_at":"2016-09-19T17:15:19Z","pushed_at":"2016-09-29T18:33:11Z","git_url":"git://github.com/kzantow/blueocean-plugin.git","ssh_url":"git@github.com:kzantow/blueocean-plugin.git","clone_url":"https://github.com/kzantow/blueocean-plugin.git","svn_url":"https://github.com/kzantow/blueocean-plugin","homepage":null,"size":8820,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","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":"89d5a2d0be20ec235805deb1e718d727fe52a86c","user":{"login":"jenkinsci","id":107424,"avatar_url":"https://avatars.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":50250915,"name":"blueocean-plugin","full_name":"jenkinsci/blueocean-plugin","owner":{"login":"jenkinsci","id":107424,"avatar_url":"https://avatars.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/blueocean-plugin","description":"Blue Ocean is a reboot of the Jenkins CI/CD User Experience","fork":false,"url":"https://api.github.com/repos/jenkinsci/blueocean-plugin","forks_url":"https://api.github.com/repos/jenkinsci/blueocean-plugin/forks","keys_url":"https://api.github.com/repos/jenkinsci/blueocean-plugin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jenkinsci/blueocean-plugin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jenkinsci/blueocean-plugin/teams","hooks_url":"https://api.github.com/repos/jenkinsci/blueocean-plugin/hooks","issue_events_url":"https://api.github.com/repos/jenkinsci/blueocean-plugin/issues/events{/number}","events_url":"https://api.github.com/repos/jenkinsci/blueocean-plugin/events","assignees_url":"https://api.github.com/repos/jenkinsci/blueocean-plugin/assignees{/user}","branches_url":"https://api.github.com/repos/jenkinsci/blueocean-plugin/branches{/branch}","tags_url":"https://api.github.com/repos/jenkinsci/blueocean-plugin/tags","blobs_url":"https://api.github.com/repos/jenkinsci/blueocean-plugin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jenkinsci/blueocean-plugin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jenkinsci/blueocean-plugin/git/refs{/sha}","trees_url":"https://api.github.com/repos/jenkinsci/blueocean-plugin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jenkinsci/blueocean-plugin/statuses/{sha}","languages_url":"https://api.github.com/repos/jenkinsci/blueocean-plugin/languages","stargazers_url":"https://api.github.com/repos/jenkinsci/blueocean-plugin/stargazers","contributors_url":"https://api.github.com/repos/jenkinsci/blueocean-plugin/contributors","subscribers_url":"https://api.github.com/repos/jenkinsci/blueocean-plugin/subscribers","subscription_url":"https://api.github.com/repos/jenkinsci/blueocean-plugin/subscription","commits_url":"https://api.github.com/repos/jenkinsci/blueocean-plugin/commits{/sha}","git_commits_url":"https://api.github.com/repos/jenkinsci/blueocean-plugin/git/commits{/sha}","comments_url":"https://api.github.com/repos/jenkinsci/blueocean-plugin/comments{/number}","issue_comment_url":"https://api.github.com/repos/jenkinsci/blueocean-plugin/issues/comments{/number}","contents_url":"https://api.github.com/repos/jenkinsci/blueocean-plugin/contents/{+path}","compare_url":"https://api.github.com/repos/jenkinsci/blueocean-plugin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jenkinsci/blueocean-plugin/merges","archive_url":"https://api.github.com/repos/jenkinsci/blueocean-plugin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jenkinsci/blueocean-plugin/downloads","issues_url":"https://api.github.com/repos/jenkinsci/blueocean-plugin/issues{/number}","pulls_url":"https://api.github.com/repos/jenkinsci/blueocean-plugin/pulls{/number}","milestones_url":"https://api.github.com/repos/jenkinsci/blueocean-plugin/milestones{/number}","notifications_url":"https://api.github.com/repos/jenkinsci/blueocean-plugin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jenkinsci/blueocean-plugin/labels{/name}","releases_url":"https://api.github.com/repos/jenkinsci/blueocean-plugin/releases{/id}","deployments_url":"https://api.github.com/repos/jenkinsci/blueocean-plugin/deployments","created_at":"2016-01-23T18:02:45Z","updated_at":"2016-09-29T16:51:50Z","pushed_at":"2016-09-29T20:23:04Z","git_url":"git://github.com/jenkinsci/blueocean-plugin.git","ssh_url":"git@github.com:jenkinsci/blueocean-plugin.git","clone_url":"https://github.com/jenkinsci/blueocean-plugin.git","svn_url":"https://github.com/jenkinsci/blueocean-plugin","homepage":"https://jenkins.io/projects/blueocean/","size":10873,"stargazers_count":1274,"watchers_count":1274,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":108,"mirror_url":null,"open_issues_count":10,"forks":108,"open_issues":10,"watchers":1274,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/jenkinsci/blueocean-plugin/pulls/543"},"html":{"href":"https://github.com/jenkinsci/blueocean-plugin/pull/543"},"issue":{"href":"https://api.github.com/repos/jenkinsci/blueocean-plugin/issues/543"},"comments":{"href":"https://api.github.com/repos/jenkinsci/blueocean-plugin/issues/543/comments"},"review_comments":{"href":"https://api.github.com/repos/jenkinsci/blueocean-plugin/pulls/543/comments"},"review_comment":{"href":"https://api.github.com/repos/jenkinsci/blueocean-plugin/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/jenkinsci/blueocean-plugin/pulls/543/commits"},"statuses":{"href":"https://api.github.com/repos/jenkinsci/blueocean-plugin/statuses/4481fcb7ce0ad74c0799e55eef6332bdeaca42ef"}}}}
{"actor":{"display_login":"tfennelly"}}