{"action":"created","issue":{"url":"https://api.github.com/repos/IQSS/dataverse/issues/3371","repository_url":"https://api.github.com/repos/IQSS/dataverse","labels_url":"https://api.github.com/repos/IQSS/dataverse/issues/3371/labels{/name}","comments_url":"https://api.github.com/repos/IQSS/dataverse/issues/3371/comments","events_url":"https://api.github.com/repos/IQSS/dataverse/issues/3371/events","html_url":"https://github.com/IQSS/dataverse/issues/3371","id":178356206,"number":3371,"title":"category of a dataverse cannot be set via API","user":{"login":"pdurbin","id":21006,"avatar_url":"https://avatars.githubusercontent.com/u/21006?v=3","gravatar_id":"","url":"https://api.github.com/users/pdurbin","html_url":"https://github.com/pdurbin","followers_url":"https://api.github.com/users/pdurbin/followers","following_url":"https://api.github.com/users/pdurbin/following{/other_user}","gists_url":"https://api.github.com/users/pdurbin/gists{/gist_id}","starred_url":"https://api.github.com/users/pdurbin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pdurbin/subscriptions","organizations_url":"https://api.github.com/users/pdurbin/orgs","repos_url":"https://api.github.com/users/pdurbin/repos","events_url":"https://api.github.com/users/pdurbin/events{/privacy}","received_events_url":"https://api.github.com/users/pdurbin/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/IQSS/dataverse/labels/Component:%20Migration","name":"Component: Migration","color":"c7def8"},{"url":"https://api.github.com/repos/IQSS/dataverse/labels/Status:%20QA","name":"Status: QA","color":"336633"}],"state":"open","locked":false,"assignee":{"login":"pdurbin","id":21006,"avatar_url":"https://avatars.githubusercontent.com/u/21006?v=3","gravatar_id":"","url":"https://api.github.com/users/pdurbin","html_url":"https://github.com/pdurbin","followers_url":"https://api.github.com/users/pdurbin/followers","following_url":"https://api.github.com/users/pdurbin/following{/other_user}","gists_url":"https://api.github.com/users/pdurbin/gists{/gist_id}","starred_url":"https://api.github.com/users/pdurbin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pdurbin/subscriptions","organizations_url":"https://api.github.com/users/pdurbin/orgs","repos_url":"https://api.github.com/users/pdurbin/repos","events_url":"https://api.github.com/users/pdurbin/events{/privacy}","received_events_url":"https://api.github.com/users/pdurbin/received_events","type":"User","site_admin":false},"assignees":[{"login":"pdurbin","id":21006,"avatar_url":"https://avatars.githubusercontent.com/u/21006?v=3","gravatar_id":"","url":"https://api.github.com/users/pdurbin","html_url":"https://github.com/pdurbin","followers_url":"https://api.github.com/users/pdurbin/followers","following_url":"https://api.github.com/users/pdurbin/following{/other_user}","gists_url":"https://api.github.com/users/pdurbin/gists{/gist_id}","starred_url":"https://api.github.com/users/pdurbin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pdurbin/subscriptions","organizations_url":"https://api.github.com/users/pdurbin/orgs","repos_url":"https://api.github.com/users/pdurbin/repos","events_url":"https://api.github.com/users/pdurbin/events{/privacy}","received_events_url":"https://api.github.com/users/pdurbin/received_events","type":"User","site_admin":false},{"login":"bmckinney","id":509381,"avatar_url":"https://avatars.githubusercontent.com/u/509381?v=3","gravatar_id":"","url":"https://api.github.com/users/bmckinney","html_url":"https://github.com/bmckinney","followers_url":"https://api.github.com/users/bmckinney/followers","following_url":"https://api.github.com/users/bmckinney/following{/other_user}","gists_url":"https://api.github.com/users/bmckinney/gists{/gist_id}","starred_url":"https://api.github.com/users/bmckinney/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bmckinney/subscriptions","organizations_url":"https://api.github.com/users/bmckinney/orgs","repos_url":"https://api.github.com/users/bmckinney/repos","events_url":"https://api.github.com/users/bmckinney/events{/privacy}","received_events_url":"https://api.github.com/users/bmckinney/received_events","type":"User","site_admin":false}],"milestone":null,"comments":1,"created_at":"2016-09-21T14:02:54Z","updated_at":"2016-09-21T20:35:28Z","closed_at":null,"body":"In #3046 we introduced \"Laboratory\" as a dataverse category but it's impossible to set categories via API. This is an important feature for anyone migrating to Dataverse from another system, such as https://data.sbgrid.org which wants to set all dataverse categories to \"Laboratory\" during their migration."},"comment":{"url":"https://api.github.com/repos/IQSS/dataverse/issues/comments/248734852","html_url":"https://github.com/IQSS/dataverse/issues/3371#issuecomment-248734852","issue_url":"https://api.github.com/repos/IQSS/dataverse/issues/3371","id":248734852,"user":{"login":"pdurbin","id":21006,"avatar_url":"https://avatars.githubusercontent.com/u/21006?v=3","gravatar_id":"","url":"https://api.github.com/users/pdurbin","html_url":"https://github.com/pdurbin","followers_url":"https://api.github.com/users/pdurbin/followers","following_url":"https://api.github.com/users/pdurbin/following{/other_user}","gists_url":"https://api.github.com/users/pdurbin/gists{/gist_id}","starred_url":"https://api.github.com/users/pdurbin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pdurbin/subscriptions","organizations_url":"https://api.github.com/users/pdurbin/orgs","repos_url":"https://api.github.com/users/pdurbin/repos","events_url":"https://api.github.com/users/pdurbin/events{/privacy}","received_events_url":"https://api.github.com/users/pdurbin/received_events","type":"User","site_admin":false},"created_at":"2016-09-21T20:35:28Z","updated_at":"2016-09-21T20:35:28Z","body":"I just created pull request #3373, tweaking the work by @bmckinney with a couple commits of my own. I moved this straight into QA at https://waffle.io/IQSS/dataverse because I don't feel like code review is necessary (Bill and I are happy with the code) and the change is small. The code is in the \"sbgrid-json-migration\" branch and here's how to test it:\r\n\r\n- If you put `\"dataverseType\": \"LABORATORY\"` into the JSON you use to create a Dataverse via API, it should set the category to \"Laboratory\". Here's an example JSON file https://github.com/IQSS/dataverse/blob/2af246fcb87ffd62ad3e2c637abf873a2027bf49/src/test/resources/json/complete-dataverse.json\r\n- If you leave the \"dataverseType\" field out of the JSON, the old behavior is preserved and the Dataverse gets \"Uncategorized\" at a category.\r\n\r\nI didn't document the possible values (maybe I should) but here they are (from the DataverseType enum in Dataverse.java):\r\n\r\n`RESEARCHERS, RESEARCH_PROJECTS, JOURNALS, ORGANIZATIONS_INSTITUTIONS, TEACHING_COURSES, UNCATEGORIZED, LABORATORY, RESEARCH_GROUP`"}}
{"actor":{"display_login":"pdurbin"}}