{"action":"created","comment":{"url":"https://api.github.com/repos/TGAC/miso-lims/pulls/comments/90971926","pull_request_review_id":11485280,"id":90971926,"diff_hunk":"@@ -0,0 +1,51 @@\n+package uk.ac.bbsrc.tgac.miso.core.service.naming.generation;\n+\n+import java.util.regex.Matcher;\n+import java.util.regex.Pattern;\n+\n+import uk.ac.bbsrc.tgac.miso.core.data.Library;\n+import uk.ac.bbsrc.tgac.miso.core.exception.MisoNamingException;\n+\n+// TODO: fix/finish - this is the alias generation code as it was (not working) before naming scheme refactor (GLT-551)\n+public class OicrLibraryAliasGenerator implements NameGenerator<Library> {\n+\n+  private static final String sampleRegex = \"^([A-Z\\\\d]{3,5}_\\\\d{3,5}_(?:[A-Z][a-z]|nn)_[A-Zn])_.*\";\n+  private static final Pattern samplePattern = Pattern.compile(sampleRegex);\n+\n+  @Override\n+  public String generate(Library library) throws MisoNamingException {\n+    if (library.getSample() != null) {\n+      Matcher m = samplePattern.matcher(library.getSample().getAlias());\n+\n+      if (m.matches()) {\n+        // try {\n+        // int numLibs = requestManager.listAllLibrariesBySampleId(l.getSample().getId()).size();","path":"core/src/main/java/uk/ac/bbsrc/tgac/miso/core/service/naming/generation/OicrLibraryAliasGenerator.java","position":22,"original_position":22,"commit_id":"8016134ed14f9837c65383a2ff74565807b4bd47","original_commit_id":"8016134ed14f9837c65383a2ff74565807b4bd47","user":{"login":"djcooke","id":12240540,"avatar_url":"https://avatars.githubusercontent.com/u/12240540?v=3","gravatar_id":"","url":"https://api.github.com/users/djcooke","html_url":"https://github.com/djcooke","followers_url":"https://api.github.com/users/djcooke/followers","following_url":"https://api.github.com/users/djcooke/following{/other_user}","gists_url":"https://api.github.com/users/djcooke/gists{/gist_id}","starred_url":"https://api.github.com/users/djcooke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/djcooke/subscriptions","organizations_url":"https://api.github.com/users/djcooke/orgs","repos_url":"https://api.github.com/users/djcooke/repos","events_url":"https://api.github.com/users/djcooke/events{/privacy}","received_events_url":"https://api.github.com/users/djcooke/received_events","type":"User","site_admin":false},"body":"This is the library alias generation code more-or-less copy/pasted from what existed before. I did not fix the generator, which didn't work before. I'm not sure if the code that's commented out is useful. I will make sure there is a ticket open for getting Library alias generation working though","created_at":"2016-12-05T22:36:52Z","updated_at":"2016-12-05T22:36:52Z","html_url":"https://github.com/TGAC/miso-lims/pull/571#discussion_r90971926","pull_request_url":"https://api.github.com/repos/TGAC/miso-lims/pulls/571","_links":{"self":{"href":"https://api.github.com/repos/TGAC/miso-lims/pulls/comments/90971926"},"html":{"href":"https://github.com/TGAC/miso-lims/pull/571#discussion_r90971926"},"pull_request":{"href":"https://api.github.com/repos/TGAC/miso-lims/pulls/571"}}},"pull_request":{"url":"https://api.github.com/repos/TGAC/miso-lims/pulls/571","id":96360193,"html_url":"https://github.com/TGAC/miso-lims/pull/571","diff_url":"https://github.com/TGAC/miso-lims/pull/571.diff","patch_url":"https://github.com/TGAC/miso-lims/pull/571.patch","issue_url":"https://api.github.com/repos/TGAC/miso-lims/issues/571","number":571,"state":"open","locked":false,"title":"Glt 551 naming refactor","user":{"login":"djcooke","id":12240540,"avatar_url":"https://avatars.githubusercontent.com/u/12240540?v=3","gravatar_id":"","url":"https://api.github.com/users/djcooke","html_url":"https://github.com/djcooke","followers_url":"https://api.github.com/users/djcooke/followers","following_url":"https://api.github.com/users/djcooke/following{/other_user}","gists_url":"https://api.github.com/users/djcooke/gists{/gist_id}","starred_url":"https://api.github.com/users/djcooke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/djcooke/subscriptions","organizations_url":"https://api.github.com/users/djcooke/orgs","repos_url":"https://api.github.com/users/djcooke/repos","events_url":"https://api.github.com/users/djcooke/events{/privacy}","received_events_url":"https://api.github.com/users/djcooke/received_events","type":"User","site_admin":false},"body":"Note that this patch requires a change in miso.properties settings\r\n* To maintain the default functionality from before this patch, you can either remove all naming configuration (anything beginning with `miso.naming`), or include only `miso.naming.scheme:default`. If you are using the miso.properties within the generated .war, it has been adjusted to use the defaults.\r\n* To configure all of the OICR naming scheme, include `miso.naming.scheme:oicr` and remove all `miso.naming` settings\r\n\r\nDocumentation of all options in the Maintainer's Guide will follow","created_at":"2016-12-02T21:58:06Z","updated_at":"2016-12-05T22:36:52Z","closed_at":null,"merged_at":null,"merge_commit_sha":"dfd7473fd4cbe49678b954127ab78fbbbdfe6965","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/TGAC/miso-lims/pulls/571/commits","review_comments_url":"https://api.github.com/repos/TGAC/miso-lims/pulls/571/comments","review_comment_url":"https://api.github.com/repos/TGAC/miso-lims/pulls/comments{/number}","comments_url":"https://api.github.com/repos/TGAC/miso-lims/issues/571/comments","statuses_url":"https://api.github.com/repos/TGAC/miso-lims/statuses/8016134ed14f9837c65383a2ff74565807b4bd47","head":{"label":"oicr-gsi:GLT-551_naming_refactor","ref":"GLT-551_naming_refactor","sha":"8016134ed14f9837c65383a2ff74565807b4bd47","user":{"login":"oicr-gsi","id":4701585,"avatar_url":"https://avatars.githubusercontent.com/u/4701585?v=3","gravatar_id":"","url":"https://api.github.com/users/oicr-gsi","html_url":"https://github.com/oicr-gsi","followers_url":"https://api.github.com/users/oicr-gsi/followers","following_url":"https://api.github.com/users/oicr-gsi/following{/other_user}","gists_url":"https://api.github.com/users/oicr-gsi/gists{/gist_id}","starred_url":"https://api.github.com/users/oicr-gsi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oicr-gsi/subscriptions","organizations_url":"https://api.github.com/users/oicr-gsi/orgs","repos_url":"https://api.github.com/users/oicr-gsi/repos","events_url":"https://api.github.com/users/oicr-gsi/events{/privacy}","received_events_url":"https://api.github.com/users/oicr-gsi/received_events","type":"Organization","site_admin":false},"repo":{"id":37474147,"name":"miso-lims","full_name":"oicr-gsi/miso-lims","owner":{"login":"oicr-gsi","id":4701585,"avatar_url":"https://avatars.githubusercontent.com/u/4701585?v=3","gravatar_id":"","url":"https://api.github.com/users/oicr-gsi","html_url":"https://github.com/oicr-gsi","followers_url":"https://api.github.com/users/oicr-gsi/followers","following_url":"https://api.github.com/users/oicr-gsi/following{/other_user}","gists_url":"https://api.github.com/users/oicr-gsi/gists{/gist_id}","starred_url":"https://api.github.com/users/oicr-gsi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oicr-gsi/subscriptions","organizations_url":"https://api.github.com/users/oicr-gsi/orgs","repos_url":"https://api.github.com/users/oicr-gsi/repos","events_url":"https://api.github.com/users/oicr-gsi/events{/privacy}","received_events_url":"https://api.github.com/users/oicr-gsi/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/oicr-gsi/miso-lims","description":"MISO: An open-source LIMS for NGS sequencing centres","fork":true,"url":"https://api.github.com/repos/oicr-gsi/miso-lims","forks_url":"https://api.github.com/repos/oicr-gsi/miso-lims/forks","keys_url":"https://api.github.com/repos/oicr-gsi/miso-lims/keys{/key_id}","collaborators_url":"https://api.github.com/repos/oicr-gsi/miso-lims/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/oicr-gsi/miso-lims/teams","hooks_url":"https://api.github.com/repos/oicr-gsi/miso-lims/hooks","issue_events_url":"https://api.github.com/repos/oicr-gsi/miso-lims/issues/events{/number}","events_url":"https://api.github.com/repos/oicr-gsi/miso-lims/events","assignees_url":"https://api.github.com/repos/oicr-gsi/miso-lims/assignees{/user}","branches_url":"https://api.github.com/repos/oicr-gsi/miso-lims/branches{/branch}","tags_url":"https://api.github.com/repos/oicr-gsi/miso-lims/tags","blobs_url":"https://api.github.com/repos/oicr-gsi/miso-lims/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/oicr-gsi/miso-lims/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/oicr-gsi/miso-lims/git/refs{/sha}","trees_url":"https://api.github.com/repos/oicr-gsi/miso-lims/git/trees{/sha}","statuses_url":"https://api.github.com/repos/oicr-gsi/miso-lims/statuses/{sha}","languages_url":"https://api.github.com/repos/oicr-gsi/miso-lims/languages","stargazers_url":"https://api.github.com/repos/oicr-gsi/miso-lims/stargazers","contributors_url":"https://api.github.com/repos/oicr-gsi/miso-lims/contributors","subscribers_url":"https://api.github.com/repos/oicr-gsi/miso-lims/subscribers","subscription_url":"https://api.github.com/repos/oicr-gsi/miso-lims/subscription","commits_url":"https://api.github.com/repos/oicr-gsi/miso-lims/commits{/sha}","git_commits_url":"https://api.github.com/repos/oicr-gsi/miso-lims/git/commits{/sha}","comments_url":"https://api.github.com/repos/oicr-gsi/miso-lims/comments{/number}","issue_comment_url":"https://api.github.com/repos/oicr-gsi/miso-lims/issues/comments{/number}","contents_url":"https://api.github.com/repos/oicr-gsi/miso-lims/contents/{+path}","compare_url":"https://api.github.com/repos/oicr-gsi/miso-lims/compare/{base}...{head}","merges_url":"https://api.github.com/repos/oicr-gsi/miso-lims/merges","archive_url":"https://api.github.com/repos/oicr-gsi/miso-lims/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/oicr-gsi/miso-lims/downloads","issues_url":"https://api.github.com/repos/oicr-gsi/miso-lims/issues{/number}","pulls_url":"https://api.github.com/repos/oicr-gsi/miso-lims/pulls{/number}","milestones_url":"https://api.github.com/repos/oicr-gsi/miso-lims/milestones{/number}","notifications_url":"https://api.github.com/repos/oicr-gsi/miso-lims/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/oicr-gsi/miso-lims/labels{/name}","releases_url":"https://api.github.com/repos/oicr-gsi/miso-lims/releases{/id}","deployments_url":"https://api.github.com/repos/oicr-gsi/miso-lims/deployments","created_at":"2015-06-15T15:35:57Z","updated_at":"2016-11-23T20:14:10Z","pushed_at":"2016-12-05T22:03:53Z","git_url":"git://github.com/oicr-gsi/miso-lims.git","ssh_url":"git@github.com:oicr-gsi/miso-lims.git","clone_url":"https://github.com/oicr-gsi/miso-lims.git","svn_url":"https://github.com/oicr-gsi/miso-lims","homepage":"http://oicr-gsi.github.io/miso-lims/","size":86596,"stargazers_count":5,"watchers_count":5,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":1,"forks":4,"open_issues":1,"watchers":5,"default_branch":"oicr"}},"base":{"label":"TGAC:develop","ref":"develop","sha":"d79fd655c8d8c92b9d748eb0956545569332bd97","user":{"login":"TGAC","id":1872319,"avatar_url":"https://avatars.githubusercontent.com/u/1872319?v=3","gravatar_id":"","url":"https://api.github.com/users/TGAC","html_url":"https://github.com/TGAC","followers_url":"https://api.github.com/users/TGAC/followers","following_url":"https://api.github.com/users/TGAC/following{/other_user}","gists_url":"https://api.github.com/users/TGAC/gists{/gist_id}","starred_url":"https://api.github.com/users/TGAC/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TGAC/subscriptions","organizations_url":"https://api.github.com/users/TGAC/orgs","repos_url":"https://api.github.com/users/TGAC/repos","events_url":"https://api.github.com/users/TGAC/events{/privacy}","received_events_url":"https://api.github.com/users/TGAC/received_events","type":"Organization","site_admin":false},"repo":{"id":4726428,"name":"miso-lims","full_name":"TGAC/miso-lims","owner":{"login":"TGAC","id":1872319,"avatar_url":"https://avatars.githubusercontent.com/u/1872319?v=3","gravatar_id":"","url":"https://api.github.com/users/TGAC","html_url":"https://github.com/TGAC","followers_url":"https://api.github.com/users/TGAC/followers","following_url":"https://api.github.com/users/TGAC/following{/other_user}","gists_url":"https://api.github.com/users/TGAC/gists{/gist_id}","starred_url":"https://api.github.com/users/TGAC/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TGAC/subscriptions","organizations_url":"https://api.github.com/users/TGAC/orgs","repos_url":"https://api.github.com/users/TGAC/repos","events_url":"https://api.github.com/users/TGAC/events{/privacy}","received_events_url":"https://api.github.com/users/TGAC/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/TGAC/miso-lims","description":"MISO: An open-source LIMS for NGS sequencing centres","fork":false,"url":"https://api.github.com/repos/TGAC/miso-lims","forks_url":"https://api.github.com/repos/TGAC/miso-lims/forks","keys_url":"https://api.github.com/repos/TGAC/miso-lims/keys{/key_id}","collaborators_url":"https://api.github.com/repos/TGAC/miso-lims/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/TGAC/miso-lims/teams","hooks_url":"https://api.github.com/repos/TGAC/miso-lims/hooks","issue_events_url":"https://api.github.com/repos/TGAC/miso-lims/issues/events{/number}","events_url":"https://api.github.com/repos/TGAC/miso-lims/events","assignees_url":"https://api.github.com/repos/TGAC/miso-lims/assignees{/user}","branches_url":"https://api.github.com/repos/TGAC/miso-lims/branches{/branch}","tags_url":"https://api.github.com/repos/TGAC/miso-lims/tags","blobs_url":"https://api.github.com/repos/TGAC/miso-lims/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/TGAC/miso-lims/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/TGAC/miso-lims/git/refs{/sha}","trees_url":"https://api.github.com/repos/TGAC/miso-lims/git/trees{/sha}","statuses_url":"https://api.github.com/repos/TGAC/miso-lims/statuses/{sha}","languages_url":"https://api.github.com/repos/TGAC/miso-lims/languages","stargazers_url":"https://api.github.com/repos/TGAC/miso-lims/stargazers","contributors_url":"https://api.github.com/repos/TGAC/miso-lims/contributors","subscribers_url":"https://api.github.com/repos/TGAC/miso-lims/subscribers","subscription_url":"https://api.github.com/repos/TGAC/miso-lims/subscription","commits_url":"https://api.github.com/repos/TGAC/miso-lims/commits{/sha}","git_commits_url":"https://api.github.com/repos/TGAC/miso-lims/git/commits{/sha}","comments_url":"https://api.github.com/repos/TGAC/miso-lims/comments{/number}","issue_comment_url":"https://api.github.com/repos/TGAC/miso-lims/issues/comments{/number}","contents_url":"https://api.github.com/repos/TGAC/miso-lims/contents/{+path}","compare_url":"https://api.github.com/repos/TGAC/miso-lims/compare/{base}...{head}","merges_url":"https://api.github.com/repos/TGAC/miso-lims/merges","archive_url":"https://api.github.com/repos/TGAC/miso-lims/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/TGAC/miso-lims/downloads","issues_url":"https://api.github.com/repos/TGAC/miso-lims/issues{/number}","pulls_url":"https://api.github.com/repos/TGAC/miso-lims/pulls{/number}","milestones_url":"https://api.github.com/repos/TGAC/miso-lims/milestones{/number}","notifications_url":"https://api.github.com/repos/TGAC/miso-lims/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/TGAC/miso-lims/labels{/name}","releases_url":"https://api.github.com/repos/TGAC/miso-lims/releases{/id}","deployments_url":"https://api.github.com/repos/TGAC/miso-lims/deployments","created_at":"2012-06-20T13:17:28Z","updated_at":"2016-11-23T20:14:14Z","pushed_at":"2016-12-05T22:03:54Z","git_url":"git://github.com/TGAC/miso-lims.git","ssh_url":"git@github.com:TGAC/miso-lims.git","clone_url":"https://github.com/TGAC/miso-lims.git","svn_url":"https://github.com/TGAC/miso-lims","homepage":null,"size":156624,"stargazers_count":50,"watchers_count":50,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":25,"mirror_url":null,"open_issues_count":4,"forks":25,"open_issues":4,"watchers":50,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/TGAC/miso-lims/pulls/571"},"html":{"href":"https://github.com/TGAC/miso-lims/pull/571"},"issue":{"href":"https://api.github.com/repos/TGAC/miso-lims/issues/571"},"comments":{"href":"https://api.github.com/repos/TGAC/miso-lims/issues/571/comments"},"review_comments":{"href":"https://api.github.com/repos/TGAC/miso-lims/pulls/571/comments"},"review_comment":{"href":"https://api.github.com/repos/TGAC/miso-lims/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/TGAC/miso-lims/pulls/571/commits"},"statuses":{"href":"https://api.github.com/repos/TGAC/miso-lims/statuses/8016134ed14f9837c65383a2ff74565807b4bd47"}}}}
{"actor":{"display_login":"djcooke"}}