{"action":"created","comment":{"url":"https://api.github.com/repos/TGAC/miso-lims/pulls/comments/51004332","id":51004332,"diff_hunk":"@@ -0,0 +1,156 @@\n+/*\n+ * Copyright (c) 2012. The Genome Analysis Centre, Norwich, UK\n+ * MISO project contacts: Robert Davey, Mario Caccamo @ TGAC\n+ * *********************************************************************\n+ *\n+ * This file is part of MISO.\n+ *\n+ * MISO is free software: you can redistribute it and/or modify\n+ * it under the terms of the GNU General Public License as published by\n+ * the Free Software Foundation, either version 3 of the License, or\n+ * (at your option) any later version.\n+ *\n+ * MISO is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with MISO.  If not, see <http://www.gnu.org/licenses/>.\n+ *\n+ * *********************************************************************\n+ */\n+\n+package uk.ac.bbsrc.tgac.miso.webapp.controller;\n+\n+import java.io.IOException;\n+import java.text.SimpleDateFormat;\n+import java.util.Collections;\n+import java.util.Date;\n+import java.util.HashMap;\n+import java.util.Map;\n+\n+import org.slf4j.Logger;\n+import org.slf4j.LoggerFactory;\n+import org.springframework.beans.factory.annotation.Autowired;\n+import org.springframework.beans.propertyeditors.CustomDateEditor;\n+import org.springframework.jdbc.core.JdbcTemplate;\n+import org.springframework.stereotype.Controller;\n+import org.springframework.ui.ModelMap;\n+import org.springframework.web.bind.WebDataBinder;\n+import org.springframework.web.bind.annotation.InitBinder;\n+import org.springframework.web.bind.annotation.ModelAttribute;\n+import org.springframework.web.bind.annotation.PathVariable;\n+import org.springframework.web.bind.annotation.RequestMapping;\n+import org.springframework.web.bind.annotation.RequestMethod;\n+import org.springframework.web.bind.annotation.SessionAttributes;\n+import org.springframework.web.bind.support.SessionStatus;\n+import org.springframework.web.servlet.ModelAndView;\n+\n+import uk.ac.bbsrc.tgac.miso.core.data.AbstractSequencerServiceRecord;\n+import uk.ac.bbsrc.tgac.miso.core.data.SequencerReference;\n+import uk.ac.bbsrc.tgac.miso.core.data.SequencerServiceRecord;\n+import uk.ac.bbsrc.tgac.miso.core.factory.DataObjectFactory;\n+import uk.ac.bbsrc.tgac.miso.core.manager.FilesManager;\n+import uk.ac.bbsrc.tgac.miso.core.manager.RequestManager;\n+import uk.ac.bbsrc.tgac.miso.sqlstore.util.DbUtils;\n+\n+@Controller\n+@RequestMapping(\"/stats/sequencer/servicerecord\")\n+@SessionAttributes(\"serviceRecord\")\n+public class EditServiceRecordController {\n+  \n+  protected static final Logger log = LoggerFactory.getLogger(EditServiceRecordController.class);\n+  \n+  @Autowired\n+  private RequestManager requestManager;\n+\n+  @Autowired\n+  private FilesManager filesManager;\n+\n+  @Autowired\n+  private DataObjectFactory dataObjectFactory;\n+  \n+  @Autowired\n+  private JdbcTemplate jdbcTemplate;\n+\n+  public void setInterfaceTemplate(JdbcTemplate interfaceTemplate) {\n+    this.jdbcTemplate = interfaceTemplate;\n+  }\n+\n+  public void setRequestManager(uk.ac.bbsrc.tgac.miso.core.manager.RequestManager requestManager) {","path":"miso-web/src/main/java/uk/ac/bbsrc/tgac/miso/webapp/controller/EditServiceRecordController.java","position":81,"original_position":81,"commit_id":"34b4e13b71a110bd0fe51b41debe2042c47939c7","original_commit_id":"34b4e13b71a110bd0fe51b41debe2042c47939c7","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":"I don't see a reason for it. I can chop it down","created_at":"2016-01-27T16:00:32Z","updated_at":"2016-01-27T16:00:32Z","html_url":"https://github.com/TGAC/miso-lims/pull/56#discussion_r51004332","pull_request_url":"https://api.github.com/repos/TGAC/miso-lims/pulls/56","_links":{"self":{"href":"https://api.github.com/repos/TGAC/miso-lims/pulls/comments/51004332"},"html":{"href":"https://github.com/TGAC/miso-lims/pull/56#discussion_r51004332"},"pull_request":{"href":"https://api.github.com/repos/TGAC/miso-lims/pulls/56"}}},"pull_request":{"url":"https://api.github.com/repos/TGAC/miso-lims/pulls/56","id":57246734,"html_url":"https://github.com/TGAC/miso-lims/pull/56","diff_url":"https://github.com/TGAC/miso-lims/pull/56.diff","patch_url":"https://github.com/TGAC/miso-lims/pull/56.patch","issue_url":"https://api.github.com/repos/TGAC/miso-lims/issues/56","number":56,"state":"open","locked":false,"title":"Glt 212 sequencer ref details","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":"Adds to Sequencer Reference\r\n* Service Records (with file attachments)\r\n* Fields:\r\n  * serial number\r\n  * date commissioned\r\n  * date decommissioned\r\n  * upgraded sequencer reference\r\n* Additional data (derived from above)\r\n  * active\r\n  * last serviced date\r\n* Read-only (non-admin) Sequencer pages\r\n  * List Sequencers\r\n  * View Sequencer\r\n  * View Service Record","created_at":"2016-01-26T17:54:29Z","updated_at":"2016-01-27T16:00:32Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8234801a6a2a744594ecbe88870e29ce91a16e19","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/TGAC/miso-lims/pulls/56/commits","review_comments_url":"https://api.github.com/repos/TGAC/miso-lims/pulls/56/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/56/comments","statuses_url":"https://api.github.com/repos/TGAC/miso-lims/statuses/34b4e13b71a110bd0fe51b41debe2042c47939c7","head":{"label":"oicr-gsi:GLT-212_sequencer_ref_details","ref":"GLT-212_sequencer_ref_details","sha":"34b4e13b71a110bd0fe51b41debe2042c47939c7","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-01-25T19:59:26Z","pushed_at":"2016-01-26T21:47:55Z","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":null,"size":78544,"stargazers_count":2,"watchers_count":2,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":4,"mirror_url":null,"open_issues_count":2,"forks":4,"open_issues":2,"watchers":2,"default_branch":"oicr"}},"base":{"label":"TGAC:develop","ref":"develop","sha":"5a87dcb54bc10906b6b2304c803d8a7decc96bf9","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-01-25T19:57:34Z","pushed_at":"2016-01-26T17:54:30Z","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":79425,"stargazers_count":30,"watchers_count":30,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":18,"mirror_url":null,"open_issues_count":1,"forks":18,"open_issues":1,"watchers":30,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/TGAC/miso-lims/pulls/56"},"html":{"href":"https://github.com/TGAC/miso-lims/pull/56"},"issue":{"href":"https://api.github.com/repos/TGAC/miso-lims/issues/56"},"comments":{"href":"https://api.github.com/repos/TGAC/miso-lims/issues/56/comments"},"review_comments":{"href":"https://api.github.com/repos/TGAC/miso-lims/pulls/56/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/56/commits"},"statuses":{"href":"https://api.github.com/repos/TGAC/miso-lims/statuses/34b4e13b71a110bd0fe51b41debe2042c47939c7"}}}}