Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

category of a dataverse cannot be set via API #3371

Closed
pdurbin opened this issue Sep 21, 2016 · 8 comments
Closed

category of a dataverse cannot be set via API #3371

pdurbin opened this issue Sep 21, 2016 · 8 comments

Comments

@pdurbin
Copy link
Member

pdurbin commented Sep 21, 2016

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.

pdurbin added a commit that referenced this issue Sep 21, 2016
Also, be more strict. Require ALL CAPS. We can always loosen this later.
@pdurbin
Copy link
Member Author

pdurbin commented Sep 21, 2016

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:

I didn't document the possible values (maybe I should) but here they are (from the DataverseType enum in Dataverse.java):

RESEARCHERS, RESEARCH_PROJECTS, JOURNALS, ORGANIZATIONS_INSTITUTIONS, TEACHING_COURSES, UNCATEGORIZED, LABORATORY, RESEARCH_GROUP

@pdurbin
Copy link
Member Author

pdurbin commented Sep 21, 2016

I moved this straight into QA at https://waffle.io/IQSS/dataverse

I moved this issue straight to QA but the pull request itself I put in Code Review: #3373

@pdurbin
Copy link
Member Author

pdurbin commented Sep 23, 2016

@bmckinney can you please code review 203966f? For now I want the API to be more strict so I changed equalsIgnoreCase to equals. If you're fine with this and you feel like this branch is ready for QA, please comment below. Thanks!

@bmckinney
Copy link
Contributor

Thumbs, up. Thanks!

@pdurbin
Copy link
Member Author

pdurbin commented Sep 23, 2016

@bmckinney great! I moved it to QA in https://waffle.io/IQSS/dataverse

@kcondon instructions on how to test are at #3371 (comment)

@pdurbin pdurbin assigned kcondon and unassigned pdurbin Sep 23, 2016
@pdurbin pdurbin added the SBGrid label Oct 7, 2016
@kcondon
Copy link
Contributor

kcondon commented Oct 14, 2016

Please add json example to docs, thanks.

@kcondon kcondon assigned pdurbin and unassigned kcondon Oct 14, 2016
pdurbin added a commit that referenced this issue Oct 14, 2016
Also expose database constraint violations via API.
@pdurbin
Copy link
Member Author

pdurbin commented Oct 14, 2016

@kcondon as we discussed I added a JSON example to the API Guide in 510b907 and while I was in there I improved the error reporting for when you don't send the right JSON to create a dataverse. I'm aware that a 500 error is still being thrown but at least you get a sense of which bean validation rules are not being obeyed. Passing back to you.

@pdurbin pdurbin assigned kcondon and unassigned pdurbin Oct 14, 2016
@kcondon
Copy link
Contributor

kcondon commented Oct 14, 2016

Looks good, closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants