{"action":"opened","issue":{"url":"https://api.github.com/repos/EdinburghGenomics/Analysis-Driver/issues/180","repository_url":"https://api.github.com/repos/EdinburghGenomics/Analysis-Driver","labels_url":"https://api.github.com/repos/EdinburghGenomics/Analysis-Driver/issues/180/labels{/name}","comments_url":"https://api.github.com/repos/EdinburghGenomics/Analysis-Driver/issues/180/comments","events_url":"https://api.github.com/repos/EdinburghGenomics/Analysis-Driver/issues/180/events","html_url":"https://github.com/EdinburghGenomics/Analysis-Driver/issues/180","id":168054784,"number":180,"title":"Retrieve actual library id from Lims and upload to Reporting-app","user":{"login":"tcezard","id":650891,"avatar_url":"https://avatars.githubusercontent.com/u/650891?v=3","gravatar_id":"","url":"https://api.github.com/users/tcezard","html_url":"https://github.com/tcezard","followers_url":"https://api.github.com/users/tcezard/followers","following_url":"https://api.github.com/users/tcezard/following{/other_user}","gists_url":"https://api.github.com/users/tcezard/gists{/gist_id}","starred_url":"https://api.github.com/users/tcezard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tcezard/subscriptions","organizations_url":"https://api.github.com/users/tcezard/orgs","repos_url":"https://api.github.com/users/tcezard/repos","events_url":"https://api.github.com/users/tcezard/events{/privacy}","received_events_url":"https://api.github.com/users/tcezard/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-07-28T09:44:32Z","updated_at":"2016-07-28T09:44:32Z","closed_at":null,"body":"We have had a few instances where more than one libraries were created out of one sample.\r\nWe need to be able to support these cases.\r\nThe first step is to record the actual library id which means finding it in the LIMS.\r\nThe code bellow should work but we need to confirm that it will work in every case\r\n```python\r\ndef get_library_id(sample_name):\r\n    sample = get_sample(sample_name)\r\n    if not sample:\r\n        return None\r\n    artifacts = connection().get_artifacts(\r\n            sample_name=sample.name,\r\n            type='Analyte',\r\n            process_type='AUTOMATED - Clean Up ALP'\r\n    )\r\n    if not artifacts:\r\n        return None\r\n    return artifacts[0].udf.get('Raw Library ID')\r\n```\r\nThen we should upload this to Reporting app database in sample endpoint\r\n"}}
{"actor":{"display_login":"tcezard"}}