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

4448 api edit var meta #5971

Merged
merged 77 commits into from
Jul 10, 2019
Merged

4448 api edit var meta #5971

merged 77 commits into from
Jul 10, 2019

Conversation

lubitchv
Copy link
Contributor

@lubitchv lubitchv commented Jun 25, 2019

New API endpoint in EditDDI.java for updating variable level metadata.
It is used in Data Curation Tool and also can be called using curl command with corresponding xml file.

Related Issues

Closes #4448
Closes #4174

Pull Request Checklist

  • Unit [tests][] completed
  • [ X] Integration [tests][]: EditDDIIT.java
  • Deployment requirements, [SQL updates][], [Solr updates][], etc.: None
  • [ x] [Documentation][docs] completed
  • Merged latest from "develop" [branch][] and resolved conflicts

@pdurbin
Copy link
Member

pdurbin commented Jun 28, 2019

This means someone will need to add some installation instructions to the README at https://github.com/scholarsportal/Dataverse-Data-Curation-Tool just like https://github.com/scholarsportal/Dataverse-Data-Explorer#installation

I just created an issue for this: scholarsportal/Dataverse-Data-Explorer#4

…review

4448 api edit var meta pdurbin code review
@lubitchv
Copy link
Contributor Author

lubitchv commented Jun 28, 2019

@pdurbin I merged your pull request into mine.

@pdurbin
Copy link
Member

pdurbin commented Jun 28, 2019

@lubitchv thanks! I moved your pull request to QA. Please don't forget to work on scholarsportal/Dataverse-Data-Explorer#4 so the Dataverse community can start installing and using this great new tool!

@kcondon
Copy link
Contributor

kcondon commented Jul 9, 2019

@lubitchv

API works if I download dct.xml from curation tool after making changes. A couple data curation tool issues:
[ ] FYI, curation tool persists weighted var on selected var even if cancel, eg. make var 1 wgt, make var2 have var1 as wgt but then cancel. If view, var2 still has var1 as wgt unless choose unweighted.
[ ] Cannot save edits in curation tool

Also, one potential issue for Dataverse:
[ ] Versions tab shows difference type but no details. Should it?
it says, "Variable Metadata (Changed Variable Metadata: 1); View Details" but no details
This can probably be merged but passing back for comment

@lubitchv
Copy link
Contributor Author

lubitchv commented Jul 9, 2019

Thank you, @kcondon

  1. Persistence of weighted var on selected var even if cancel is indeed a bug in UI Data Curation Tool. I started working on fixing it. But it does not have a direct connection to this pull request (API), it is an UI issue. Thank you for noticing it.

  2. Save edits does not work in DCT if one integrates external tool with siteUrl (for example github). Then it runs into issue of CORS. We should discuss it. How should we allow PUT from external site. But if one integrates external tool putting it in webapps and compiling it with dataverse, getting it in war file then save edits works.
    This issue can be treated as separate issue and I was planning to open an issue for that.

  3. Version tab indeed shows difference type but no details. It was done on purpose. The reason for it: there can be hundreads of variables that may be updated. It was not clear how to present it in dataverse UI. And we probably should think how it can be done and we left it for later work.

@kcondon
Copy link
Contributor

kcondon commented Jul 9, 2019

@lubitchv OK, makes sense. Thanks. What does the 1 represent in: "Variable Metadata (Changed Variable Metadata: 1); View Details"

@lubitchv
Copy link
Contributor Author

lubitchv commented Jul 9, 2019

@kcondon 1 represents number of files changed, not a number of variables, since in in one dataset can be several files that maybe updated.

@kcondon
Copy link
Contributor

kcondon commented Jul 9, 2019

@lubitchv OK, thanks. Will move it back to qa. Ready to merge, pending point release planning. It may need refresh from develop if it is not included in point release.

@kcondon kcondon assigned kcondon and unassigned lubitchv Jul 9, 2019
@djbrooke djbrooke added this to the 4.15.1 milestone Jul 10, 2019
@kcondon kcondon merged commit dcb6ca1 into IQSS:develop Jul 10, 2019
@ingridpacheco
Copy link

ingridpacheco commented Nov 10, 2021

Hey guys, I hope you can help me out with this problem. I tried using this endpoint to update my variable level metadata, but it turns out that it didn't really update it and nothing happened.

I followed exactly the steps in the documentation and performed a curl updating my file with an XML file:

curl -H "X-Dataverse-key:xxxxxx" -X PUT https://gofairbr.rnp.br/api/edit/118 --upload-file dct.xml

As a response, I received an empty object on my terminal screen and when I went to check my file on Dataverse, its variable metadata was exactly the same, as if I have never updated it.

Captura de Tela 2021-11-09 às 23 22 39

Do you have any thoughts on what could have happened? Do I need special permission to do this or only being the owner of my dataset is enough? Does this endpoint need any special input that I am not aware of?

Thanks in advance,
Ingrid

@pdurbin
Copy link
Member

pdurbin commented Nov 10, 2021

@ingridpacheco thanks for opening this new issue about this:

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