{"action":"created","comment":{"url":"https://api.github.com/repos/ox-it/wl-citations/pulls/comments/41614023","id":41614023,"diff_hunk":"@@ -3989,7 +4016,44 @@ public void doImportCitationFromResourceUrl( RunData data )\n \t    setMode(state, Mode.LIST);\n \n \t} // doImportCitationsFromResourceUrl\n-\t\n+\n+\tprivate Citation extractCitationFromRunData(RunData data) {\n+\t\ttry {\n+\t\t\tSessionState session = ((JetspeedRunData)data).getPortletSessionState(((JetspeedRunData) data).getJs_peid());\n+\t\t\tif(session.getAttribute(FilePickerHelper.FILE_PICKER_ATTACHMENTS) != null) {\n+\t\t\t\tList refs = (List) session\n+\t\t\t\t\t\t.getAttribute(FilePickerHelper.FILE_PICKER_ATTACHMENTS);\n+\t\t\t\tString citationCollectionId = (String) sessionManager.getCurrentToolSession().getAttribute(STATE_CITATION_COLLECTION_ID);\n+\t\t\t\tCitationCollection collection = getCitationService().getCollection(citationCollectionId);\n+\t\t\t\tCitation citation = null;\n+\t\t\t\tif (!refs.isEmpty()) {\n+\t\t\t\t\tfor (Iterator it = refs.iterator(); it.hasNext(); ) {","path":"citations-tool/tool/src/java/org/sakaiproject/citation/tool/CitationHelperAction.java","position":157,"original_position":157,"commit_id":"aadebcaa94e806e266534c7163fad43434d61348","original_commit_id":"aadebcaa94e806e266534c7163fad43434d61348","user":{"login":"buckett","id":5921,"avatar_url":"https://avatars.githubusercontent.com/u/5921?v=3","gravatar_id":"","url":"https://api.github.com/users/buckett","html_url":"https://github.com/buckett","followers_url":"https://api.github.com/users/buckett/followers","following_url":"https://api.github.com/users/buckett/following{/other_user}","gists_url":"https://api.github.com/users/buckett/gists{/gist_id}","starred_url":"https://api.github.com/users/buckett/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/buckett/subscriptions","organizations_url":"https://api.github.com/users/buckett/orgs","repos_url":"https://api.github.com/users/buckett/repos","events_url":"https://api.github.com/users/buckett/events{/privacy}","received_events_url":"https://api.github.com/users/buckett/received_events","type":"User","site_admin":false},"body":"You iterate over all the references, but throw all the changes away apart from the last one, is there a reason for doing this?","created_at":"2015-10-09T09:48:01Z","updated_at":"2015-10-09T09:48:01Z","html_url":"https://github.com/ox-it/wl-citations/pull/37#discussion_r41614023","pull_request_url":"https://api.github.com/repos/ox-it/wl-citations/pulls/37","_links":{"self":{"href":"https://api.github.com/repos/ox-it/wl-citations/pulls/comments/41614023"},"html":{"href":"https://github.com/ox-it/wl-citations/pull/37#discussion_r41614023"},"pull_request":{"href":"https://api.github.com/repos/ox-it/wl-citations/pulls/37"}}},"pull_request":{"url":"https://api.github.com/repos/ox-it/wl-citations/pulls/37","id":41788347,"html_url":"https://github.com/ox-it/wl-citations/pull/37","diff_url":"https://github.com/ox-it/wl-citations/pull/37.diff","patch_url":"https://github.com/ox-it/wl-citations/pull/37.patch","issue_url":"https://api.github.com/repos/ox-it/wl-citations/issues/37","number":37,"state":"open","locked":false,"title":"WL-3985 - Reimplement citations filepicker","user":{"login":"surya-janani","id":12410907,"avatar_url":"https://avatars.githubusercontent.com/u/12410907?v=3","gravatar_id":"","url":"https://api.github.com/users/surya-janani","html_url":"https://github.com/surya-janani","followers_url":"https://api.github.com/users/surya-janani/followers","following_url":"https://api.github.com/users/surya-janani/following{/other_user}","gists_url":"https://api.github.com/users/surya-janani/gists{/gist_id}","starred_url":"https://api.github.com/users/surya-janani/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/surya-janani/subscriptions","organizations_url":"https://api.github.com/users/surya-janani/orgs","repos_url":"https://api.github.com/users/surya-janani/repos","events_url":"https://api.github.com/users/surya-janani/events{/privacy}","received_events_url":"https://api.github.com/users/surya-janani/received_events","type":"User","site_admin":false},"body":"1.Redirect from citations helper to filepickerhelper using startHelper method and set mode to edit_attachment.\r\n2.extractCitationFromRunData extracts citation from attribute FILE_PICKER_ATTACHMENTS in session.\r\n3.On return from FilePickerHelper, buildEditAttachmentPanel makes use of the above method to extract citation,set in it state and pass it onto buildEditPanel.\r\n\r\n\r\nWill remove commented code on top of other review changes that come in","created_at":"2015-08-06T13:38:58Z","updated_at":"2015-10-09T09:48:01Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3d221ffa410bd41ad29b1bd81214e22d95962c89","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ox-it/wl-citations/pulls/37/commits","review_comments_url":"https://api.github.com/repos/ox-it/wl-citations/pulls/37/comments","review_comment_url":"https://api.github.com/repos/ox-it/wl-citations/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ox-it/wl-citations/issues/37/comments","statuses_url":"https://api.github.com/repos/ox-it/wl-citations/statuses/aadebcaa94e806e266534c7163fad43434d61348","head":{"label":"ox-it:WL-3985","ref":"WL-3985","sha":"aadebcaa94e806e266534c7163fad43434d61348","user":{"login":"ox-it","id":351950,"avatar_url":"https://avatars.githubusercontent.com/u/351950?v=3","gravatar_id":"","url":"https://api.github.com/users/ox-it","html_url":"https://github.com/ox-it","followers_url":"https://api.github.com/users/ox-it/followers","following_url":"https://api.github.com/users/ox-it/following{/other_user}","gists_url":"https://api.github.com/users/ox-it/gists{/gist_id}","starred_url":"https://api.github.com/users/ox-it/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ox-it/subscriptions","organizations_url":"https://api.github.com/users/ox-it/orgs","repos_url":"https://api.github.com/users/ox-it/repos","events_url":"https://api.github.com/users/ox-it/events{/privacy}","received_events_url":"https://api.github.com/users/ox-it/received_events","type":"Organization","site_admin":false},"repo":{"id":6060573,"name":"wl-citations","full_name":"ox-it/wl-citations","owner":{"login":"ox-it","id":351950,"avatar_url":"https://avatars.githubusercontent.com/u/351950?v=3","gravatar_id":"","url":"https://api.github.com/users/ox-it","html_url":"https://github.com/ox-it","followers_url":"https://api.github.com/users/ox-it/followers","following_url":"https://api.github.com/users/ox-it/following{/other_user}","gists_url":"https://api.github.com/users/ox-it/gists{/gist_id}","starred_url":"https://api.github.com/users/ox-it/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ox-it/subscriptions","organizations_url":"https://api.github.com/users/ox-it/orgs","repos_url":"https://api.github.com/users/ox-it/repos","events_url":"https://api.github.com/users/ox-it/events{/privacy}","received_events_url":"https://api.github.com/users/ox-it/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ox-it/wl-citations","description":null,"fork":false,"url":"https://api.github.com/repos/ox-it/wl-citations","forks_url":"https://api.github.com/repos/ox-it/wl-citations/forks","keys_url":"https://api.github.com/repos/ox-it/wl-citations/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ox-it/wl-citations/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ox-it/wl-citations/teams","hooks_url":"https://api.github.com/repos/ox-it/wl-citations/hooks","issue_events_url":"https://api.github.com/repos/ox-it/wl-citations/issues/events{/number}","events_url":"https://api.github.com/repos/ox-it/wl-citations/events","assignees_url":"https://api.github.com/repos/ox-it/wl-citations/assignees{/user}","branches_url":"https://api.github.com/repos/ox-it/wl-citations/branches{/branch}","tags_url":"https://api.github.com/repos/ox-it/wl-citations/tags","blobs_url":"https://api.github.com/repos/ox-it/wl-citations/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ox-it/wl-citations/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ox-it/wl-citations/git/refs{/sha}","trees_url":"https://api.github.com/repos/ox-it/wl-citations/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ox-it/wl-citations/statuses/{sha}","languages_url":"https://api.github.com/repos/ox-it/wl-citations/languages","stargazers_url":"https://api.github.com/repos/ox-it/wl-citations/stargazers","contributors_url":"https://api.github.com/repos/ox-it/wl-citations/contributors","subscribers_url":"https://api.github.com/repos/ox-it/wl-citations/subscribers","subscription_url":"https://api.github.com/repos/ox-it/wl-citations/subscription","commits_url":"https://api.github.com/repos/ox-it/wl-citations/commits{/sha}","git_commits_url":"https://api.github.com/repos/ox-it/wl-citations/git/commits{/sha}","comments_url":"https://api.github.com/repos/ox-it/wl-citations/comments{/number}","issue_comment_url":"https://api.github.com/repos/ox-it/wl-citations/issues/comments{/number}","contents_url":"https://api.github.com/repos/ox-it/wl-citations/contents/{+path}","compare_url":"https://api.github.com/repos/ox-it/wl-citations/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ox-it/wl-citations/merges","archive_url":"https://api.github.com/repos/ox-it/wl-citations/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ox-it/wl-citations/downloads","issues_url":"https://api.github.com/repos/ox-it/wl-citations/issues{/number}","pulls_url":"https://api.github.com/repos/ox-it/wl-citations/pulls{/number}","milestones_url":"https://api.github.com/repos/ox-it/wl-citations/milestones{/number}","notifications_url":"https://api.github.com/repos/ox-it/wl-citations/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ox-it/wl-citations/labels{/name}","releases_url":"https://api.github.com/repos/ox-it/wl-citations/releases{/id}","created_at":"2012-10-03T13:38:59Z","updated_at":"2015-04-29T09:59:32Z","pushed_at":"2015-10-09T09:34:25Z","git_url":"git://github.com/ox-it/wl-citations.git","ssh_url":"git@github.com:ox-it/wl-citations.git","clone_url":"https://github.com/ox-it/wl-citations.git","svn_url":"https://github.com/ox-it/wl-citations","homepage":null,"size":4251,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":0,"default_branch":"sakai-10.x"}},"base":{"label":"ox-it:sakai-10.x","ref":"sakai-10.x","sha":"16ea690d78d63eeb0040cb6702f054d960a46b27","user":{"login":"ox-it","id":351950,"avatar_url":"https://avatars.githubusercontent.com/u/351950?v=3","gravatar_id":"","url":"https://api.github.com/users/ox-it","html_url":"https://github.com/ox-it","followers_url":"https://api.github.com/users/ox-it/followers","following_url":"https://api.github.com/users/ox-it/following{/other_user}","gists_url":"https://api.github.com/users/ox-it/gists{/gist_id}","starred_url":"https://api.github.com/users/ox-it/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ox-it/subscriptions","organizations_url":"https://api.github.com/users/ox-it/orgs","repos_url":"https://api.github.com/users/ox-it/repos","events_url":"https://api.github.com/users/ox-it/events{/privacy}","received_events_url":"https://api.github.com/users/ox-it/received_events","type":"Organization","site_admin":false},"repo":{"id":6060573,"name":"wl-citations","full_name":"ox-it/wl-citations","owner":{"login":"ox-it","id":351950,"avatar_url":"https://avatars.githubusercontent.com/u/351950?v=3","gravatar_id":"","url":"https://api.github.com/users/ox-it","html_url":"https://github.com/ox-it","followers_url":"https://api.github.com/users/ox-it/followers","following_url":"https://api.github.com/users/ox-it/following{/other_user}","gists_url":"https://api.github.com/users/ox-it/gists{/gist_id}","starred_url":"https://api.github.com/users/ox-it/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ox-it/subscriptions","organizations_url":"https://api.github.com/users/ox-it/orgs","repos_url":"https://api.github.com/users/ox-it/repos","events_url":"https://api.github.com/users/ox-it/events{/privacy}","received_events_url":"https://api.github.com/users/ox-it/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ox-it/wl-citations","description":null,"fork":false,"url":"https://api.github.com/repos/ox-it/wl-citations","forks_url":"https://api.github.com/repos/ox-it/wl-citations/forks","keys_url":"https://api.github.com/repos/ox-it/wl-citations/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ox-it/wl-citations/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ox-it/wl-citations/teams","hooks_url":"https://api.github.com/repos/ox-it/wl-citations/hooks","issue_events_url":"https://api.github.com/repos/ox-it/wl-citations/issues/events{/number}","events_url":"https://api.github.com/repos/ox-it/wl-citations/events","assignees_url":"https://api.github.com/repos/ox-it/wl-citations/assignees{/user}","branches_url":"https://api.github.com/repos/ox-it/wl-citations/branches{/branch}","tags_url":"https://api.github.com/repos/ox-it/wl-citations/tags","blobs_url":"https://api.github.com/repos/ox-it/wl-citations/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ox-it/wl-citations/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ox-it/wl-citations/git/refs{/sha}","trees_url":"https://api.github.com/repos/ox-it/wl-citations/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ox-it/wl-citations/statuses/{sha}","languages_url":"https://api.github.com/repos/ox-it/wl-citations/languages","stargazers_url":"https://api.github.com/repos/ox-it/wl-citations/stargazers","contributors_url":"https://api.github.com/repos/ox-it/wl-citations/contributors","subscribers_url":"https://api.github.com/repos/ox-it/wl-citations/subscribers","subscription_url":"https://api.github.com/repos/ox-it/wl-citations/subscription","commits_url":"https://api.github.com/repos/ox-it/wl-citations/commits{/sha}","git_commits_url":"https://api.github.com/repos/ox-it/wl-citations/git/commits{/sha}","comments_url":"https://api.github.com/repos/ox-it/wl-citations/comments{/number}","issue_comment_url":"https://api.github.com/repos/ox-it/wl-citations/issues/comments{/number}","contents_url":"https://api.github.com/repos/ox-it/wl-citations/contents/{+path}","compare_url":"https://api.github.com/repos/ox-it/wl-citations/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ox-it/wl-citations/merges","archive_url":"https://api.github.com/repos/ox-it/wl-citations/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ox-it/wl-citations/downloads","issues_url":"https://api.github.com/repos/ox-it/wl-citations/issues{/number}","pulls_url":"https://api.github.com/repos/ox-it/wl-citations/pulls{/number}","milestones_url":"https://api.github.com/repos/ox-it/wl-citations/milestones{/number}","notifications_url":"https://api.github.com/repos/ox-it/wl-citations/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ox-it/wl-citations/labels{/name}","releases_url":"https://api.github.com/repos/ox-it/wl-citations/releases{/id}","created_at":"2012-10-03T13:38:59Z","updated_at":"2015-04-29T09:59:32Z","pushed_at":"2015-10-09T09:34:25Z","git_url":"git://github.com/ox-it/wl-citations.git","ssh_url":"git@github.com:ox-it/wl-citations.git","clone_url":"https://github.com/ox-it/wl-citations.git","svn_url":"https://github.com/ox-it/wl-citations","homepage":null,"size":4251,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":0,"default_branch":"sakai-10.x"}},"_links":{"self":{"href":"https://api.github.com/repos/ox-it/wl-citations/pulls/37"},"html":{"href":"https://github.com/ox-it/wl-citations/pull/37"},"issue":{"href":"https://api.github.com/repos/ox-it/wl-citations/issues/37"},"comments":{"href":"https://api.github.com/repos/ox-it/wl-citations/issues/37/comments"},"review_comments":{"href":"https://api.github.com/repos/ox-it/wl-citations/pulls/37/comments"},"review_comment":{"href":"https://api.github.com/repos/ox-it/wl-citations/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ox-it/wl-citations/pulls/37/commits"},"statuses":{"href":"https://api.github.com/repos/ox-it/wl-citations/statuses/aadebcaa94e806e266534c7163fad43434d61348"}}}}