{"action":"created","comment":{"url":"https://api.github.com/repos/jenkinsci/jenkins/pulls/comments/26576240","id":26576240,"diff_hunk":"@@ -225,6 +259,95 @@ else if(displayName.equals(name)) {\n         assertTrue(foundDispayName);\n     }\n \n+    @Issue(\"JENKINS-24433\")\n+    @Test\n+    public void testProjectNameBehindAFolderDisplayName() throws Exception {\n+        final String projectName1 = \"job-1\";\n+        final String displayName1 = \"job-1\";\n+\n+        final String projectName2 = \"job-2\";\n+        final String displayName2 = \"job-2\";\n+\n+        FreeStyleProject project1 = j.createFreeStyleProject(projectName1);\n+        project1.setDisplayName(displayName1);","path":"test/src/test/java/hudson/search/SearchTest.java","position":61,"original_position":55,"commit_id":"cb174607b348636eeaf27c6b0eab502ec1f2f3a6","original_commit_id":"44db6aef3f055455635da1e126bcd162c95f80df","user":{"login":"jglick","id":154109,"avatar_url":"https://avatars.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":"OK…but my point is that `[AbstractItem.]getDisplayName()` defaults to `getName()`, so calling `setDisplayName` with the same text is a no-op, and your test claims to be verifying that it found the `displayName` in the JSON response whereas it is really only verifying that it found _either_ the `displayName` _or_ the `name`, since here they are identical.","created_at":"2015-03-17T14:23:55Z","updated_at":"2015-03-17T14:23:55Z","html_url":"https://github.com/jenkinsci/jenkins/pull/1581#discussion_r26576240","pull_request_url":"https://api.github.com/repos/jenkinsci/jenkins/pulls/1581","_links":{"self":{"href":"https://api.github.com/repos/jenkinsci/jenkins/pulls/comments/26576240"},"html":{"href":"https://github.com/jenkinsci/jenkins/pull/1581#discussion_r26576240"},"pull_request":{"href":"https://api.github.com/repos/jenkinsci/jenkins/pulls/1581"}}},"pull_request":{"url":"https://api.github.com/repos/jenkinsci/jenkins/pulls/1581","id":29805609,"html_url":"https://github.com/jenkinsci/jenkins/pull/1581","diff_url":"https://github.com/jenkinsci/jenkins/pull/1581.diff","patch_url":"https://github.com/jenkinsci/jenkins/pull/1581.patch","issue_url":"https://api.github.com/repos/jenkinsci/jenkins/issues/1581","number":1581,"state":"open","locked":false,"title":"[FIXED JENKINS-24433] Searchbox doesn't work properly inside a folder","user":{"login":"fbelzunc","id":3898648,"avatar_url":"https://avatars.githubusercontent.com/u/3898648?v=3","gravatar_id":"","url":"https://api.github.com/users/fbelzunc","html_url":"https://github.com/fbelzunc","followers_url":"https://api.github.com/users/fbelzunc/followers","following_url":"https://api.github.com/users/fbelzunc/following{/other_user}","gists_url":"https://api.github.com/users/fbelzunc/gists{/gist_id}","starred_url":"https://api.github.com/users/fbelzunc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fbelzunc/subscriptions","organizations_url":"https://api.github.com/users/fbelzunc/orgs","repos_url":"https://api.github.com/users/fbelzunc/repos","events_url":"https://api.github.com/users/fbelzunc/events{/privacy}","received_events_url":"https://api.github.com/users/fbelzunc/received_events","type":"User","site_admin":false},"body":"[JENKINS-24433](https://issues.jenkins-ci.org/browse/JENKINS-24433)\r\n\r\nThe change in `Search.java` fixes the problem currently there is when you are in a folder, look for job which is behind the folder and try to access to the URL. You should not use `a.getUrl()`, but the current context of the request `req.getContextPath()`.\r\n\r\nChange in `SuggestedItem.java` allows you to provide the global context of each item in the tree for the search box. Otherwise, if you are in folder and look for an element behind the folder, then the search box says that this element is in the current context. Better is to provide always global context of all elements.\r\n\r\n@reviewbybees","created_at":"2015-02-23T12:41:55Z","updated_at":"2015-03-17T14:23:55Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b37c64dae549b2f4b73ed34a8417c61f0b2c5414","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/jenkinsci/jenkins/pulls/1581/commits","review_comments_url":"https://api.github.com/repos/jenkinsci/jenkins/pulls/1581/comments","review_comment_url":"https://api.github.com/repos/jenkinsci/jenkins/pulls/comments{/number}","comments_url":"https://api.github.com/repos/jenkinsci/jenkins/issues/1581/comments","statuses_url":"https://api.github.com/repos/jenkinsci/jenkins/statuses/cb174607b348636eeaf27c6b0eab502ec1f2f3a6","head":{"label":"fbelzunc:JENKINS-24433","ref":"JENKINS-24433","sha":"cb174607b348636eeaf27c6b0eab502ec1f2f3a6","user":{"login":"fbelzunc","id":3898648,"avatar_url":"https://avatars.githubusercontent.com/u/3898648?v=3","gravatar_id":"","url":"https://api.github.com/users/fbelzunc","html_url":"https://github.com/fbelzunc","followers_url":"https://api.github.com/users/fbelzunc/followers","following_url":"https://api.github.com/users/fbelzunc/following{/other_user}","gists_url":"https://api.github.com/users/fbelzunc/gists{/gist_id}","starred_url":"https://api.github.com/users/fbelzunc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fbelzunc/subscriptions","organizations_url":"https://api.github.com/users/fbelzunc/orgs","repos_url":"https://api.github.com/users/fbelzunc/repos","events_url":"https://api.github.com/users/fbelzunc/events{/privacy}","received_events_url":"https://api.github.com/users/fbelzunc/received_events","type":"User","site_admin":false},"repo":{"id":28363598,"name":"jenkins","full_name":"fbelzunc/jenkins","owner":{"login":"fbelzunc","id":3898648,"avatar_url":"https://avatars.githubusercontent.com/u/3898648?v=3","gravatar_id":"","url":"https://api.github.com/users/fbelzunc","html_url":"https://github.com/fbelzunc","followers_url":"https://api.github.com/users/fbelzunc/followers","following_url":"https://api.github.com/users/fbelzunc/following{/other_user}","gists_url":"https://api.github.com/users/fbelzunc/gists{/gist_id}","starred_url":"https://api.github.com/users/fbelzunc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fbelzunc/subscriptions","organizations_url":"https://api.github.com/users/fbelzunc/orgs","repos_url":"https://api.github.com/users/fbelzunc/repos","events_url":"https://api.github.com/users/fbelzunc/events{/privacy}","received_events_url":"https://api.github.com/users/fbelzunc/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/fbelzunc/jenkins","description":"Jenkins Continuous Integration Server","fork":true,"url":"https://api.github.com/repos/fbelzunc/jenkins","forks_url":"https://api.github.com/repos/fbelzunc/jenkins/forks","keys_url":"https://api.github.com/repos/fbelzunc/jenkins/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fbelzunc/jenkins/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fbelzunc/jenkins/teams","hooks_url":"https://api.github.com/repos/fbelzunc/jenkins/hooks","issue_events_url":"https://api.github.com/repos/fbelzunc/jenkins/issues/events{/number}","events_url":"https://api.github.com/repos/fbelzunc/jenkins/events","assignees_url":"https://api.github.com/repos/fbelzunc/jenkins/assignees{/user}","branches_url":"https://api.github.com/repos/fbelzunc/jenkins/branches{/branch}","tags_url":"https://api.github.com/repos/fbelzunc/jenkins/tags","blobs_url":"https://api.github.com/repos/fbelzunc/jenkins/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fbelzunc/jenkins/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fbelzunc/jenkins/git/refs{/sha}","trees_url":"https://api.github.com/repos/fbelzunc/jenkins/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fbelzunc/jenkins/statuses/{sha}","languages_url":"https://api.github.com/repos/fbelzunc/jenkins/languages","stargazers_url":"https://api.github.com/repos/fbelzunc/jenkins/stargazers","contributors_url":"https://api.github.com/repos/fbelzunc/jenkins/contributors","subscribers_url":"https://api.github.com/repos/fbelzunc/jenkins/subscribers","subscription_url":"https://api.github.com/repos/fbelzunc/jenkins/subscription","commits_url":"https://api.github.com/repos/fbelzunc/jenkins/commits{/sha}","git_commits_url":"https://api.github.com/repos/fbelzunc/jenkins/git/commits{/sha}","comments_url":"https://api.github.com/repos/fbelzunc/jenkins/comments{/number}","issue_comment_url":"https://api.github.com/repos/fbelzunc/jenkins/issues/comments{/number}","contents_url":"https://api.github.com/repos/fbelzunc/jenkins/contents/{+path}","compare_url":"https://api.github.com/repos/fbelzunc/jenkins/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fbelzunc/jenkins/merges","archive_url":"https://api.github.com/repos/fbelzunc/jenkins/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fbelzunc/jenkins/downloads","issues_url":"https://api.github.com/repos/fbelzunc/jenkins/issues{/number}","pulls_url":"https://api.github.com/repos/fbelzunc/jenkins/pulls{/number}","milestones_url":"https://api.github.com/repos/fbelzunc/jenkins/milestones{/number}","notifications_url":"https://api.github.com/repos/fbelzunc/jenkins/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fbelzunc/jenkins/labels{/name}","releases_url":"https://api.github.com/repos/fbelzunc/jenkins/releases{/id}","created_at":"2014-12-22T22:48:05Z","updated_at":"2015-02-23T12:11:39Z","pushed_at":"2015-03-17T13:22:46Z","git_url":"git://github.com/fbelzunc/jenkins.git","ssh_url":"git@github.com:fbelzunc/jenkins.git","clone_url":"https://github.com/fbelzunc/jenkins.git","svn_url":"https://github.com/fbelzunc/jenkins","homepage":"http://jenkins-ci.org/","size":82427,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":false,"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":"48d290031245ed6211cd69a2f2a8e958db79df7a","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":1103607,"name":"jenkins","full_name":"jenkinsci/jenkins","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/jenkins","description":"Jenkins Continuous Integration Server","fork":true,"url":"https://api.github.com/repos/jenkinsci/jenkins","forks_url":"https://api.github.com/repos/jenkinsci/jenkins/forks","keys_url":"https://api.github.com/repos/jenkinsci/jenkins/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jenkinsci/jenkins/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jenkinsci/jenkins/teams","hooks_url":"https://api.github.com/repos/jenkinsci/jenkins/hooks","issue_events_url":"https://api.github.com/repos/jenkinsci/jenkins/issues/events{/number}","events_url":"https://api.github.com/repos/jenkinsci/jenkins/events","assignees_url":"https://api.github.com/repos/jenkinsci/jenkins/assignees{/user}","branches_url":"https://api.github.com/repos/jenkinsci/jenkins/branches{/branch}","tags_url":"https://api.github.com/repos/jenkinsci/jenkins/tags","blobs_url":"https://api.github.com/repos/jenkinsci/jenkins/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jenkinsci/jenkins/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jenkinsci/jenkins/git/refs{/sha}","trees_url":"https://api.github.com/repos/jenkinsci/jenkins/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jenkinsci/jenkins/statuses/{sha}","languages_url":"https://api.github.com/repos/jenkinsci/jenkins/languages","stargazers_url":"https://api.github.com/repos/jenkinsci/jenkins/stargazers","contributors_url":"https://api.github.com/repos/jenkinsci/jenkins/contributors","subscribers_url":"https://api.github.com/repos/jenkinsci/jenkins/subscribers","subscription_url":"https://api.github.com/repos/jenkinsci/jenkins/subscription","commits_url":"https://api.github.com/repos/jenkinsci/jenkins/commits{/sha}","git_commits_url":"https://api.github.com/repos/jenkinsci/jenkins/git/commits{/sha}","comments_url":"https://api.github.com/repos/jenkinsci/jenkins/comments{/number}","issue_comment_url":"https://api.github.com/repos/jenkinsci/jenkins/issues/comments{/number}","contents_url":"https://api.github.com/repos/jenkinsci/jenkins/contents/{+path}","compare_url":"https://api.github.com/repos/jenkinsci/jenkins/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jenkinsci/jenkins/merges","archive_url":"https://api.github.com/repos/jenkinsci/jenkins/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jenkinsci/jenkins/downloads","issues_url":"https://api.github.com/repos/jenkinsci/jenkins/issues{/number}","pulls_url":"https://api.github.com/repos/jenkinsci/jenkins/pulls{/number}","milestones_url":"https://api.github.com/repos/jenkinsci/jenkins/milestones{/number}","notifications_url":"https://api.github.com/repos/jenkinsci/jenkins/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jenkinsci/jenkins/labels{/name}","releases_url":"https://api.github.com/repos/jenkinsci/jenkins/releases{/id}","created_at":"2010-11-22T21:21:23Z","updated_at":"2015-03-17T10:45:49Z","pushed_at":"2015-03-17T03:50:08Z","git_url":"git://github.com/jenkinsci/jenkins.git","ssh_url":"git@github.com:jenkinsci/jenkins.git","clone_url":"https://github.com/jenkinsci/jenkins.git","svn_url":"https://github.com/jenkinsci/jenkins","homepage":"http://jenkins-ci.org/","size":399472,"stargazers_count":3808,"watchers_count":3808,"language":"Java","has_issues":false,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":1721,"mirror_url":null,"open_issues_count":107,"forks":1721,"open_issues":107,"watchers":3808,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/jenkinsci/jenkins/pulls/1581"},"html":{"href":"https://github.com/jenkinsci/jenkins/pull/1581"},"issue":{"href":"https://api.github.com/repos/jenkinsci/jenkins/issues/1581"},"comments":{"href":"https://api.github.com/repos/jenkinsci/jenkins/issues/1581/comments"},"review_comments":{"href":"https://api.github.com/repos/jenkinsci/jenkins/pulls/1581/comments"},"review_comment":{"href":"https://api.github.com/repos/jenkinsci/jenkins/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/jenkinsci/jenkins/pulls/1581/commits"},"statuses":{"href":"https://api.github.com/repos/jenkinsci/jenkins/statuses/cb174607b348636eeaf27c6b0eab502ec1f2f3a6"}}}}