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

publication date appears in the citation #5729

Closed
MohanaPriyaNarapareddy opened this issue Apr 8, 2019 · 23 comments
Closed

publication date appears in the citation #5729

MohanaPriyaNarapareddy opened this issue Apr 8, 2019 · 23 comments

Comments

@MohanaPriyaNarapareddy
Copy link

I imported a dataset from datacite to dataverse. The import was working fine but the problem comes with the publication date in the metadata. My production date was 2016. But the publication date is 2019, and the publication date appears in the citation. Is there any way that I can edit the publication date and give my custom date? I want my production date to appear in the citation.

@pdurbin
Copy link
Member

pdurbin commented Apr 8, 2019

@MohanaPriyaNarapareddy thanks for the feedback! Yes, this is possible and documented at http://guides.dataverse.org/en/4.12/api/native-api.html#set-citation-date-field-for-a-dataset

See also the "Dates in citation" thread at https://groups.google.com/d/msg/dataverse-community/neijtUjq8fk/Svxl8A_DAwAJ

If you have any trouble, please let us know because that would be an indication that our documentation should be improved! Thanks!

@MohanaPriyaNarapareddy
Copy link
Author

@pdurbin Thanks for the reply. I tried the above command but, I am getting an error that endpoint doesn't exist. The following is my URL.
PUT http://localhost:8080/api/datasets/doi:10.7937/k9/tcia.2016.5di84js8/citationdate?key=5bbeb877-6c74-4131-8144-fbcaa128344a

I replaced $SERVER with localhost:8080 and $ID with doi:10.7937/k9/tcia.2016.5di84js8.
Not sure if ID is same as PID and also if the $Server is as same as $Serverurl

@pdurbin
Copy link
Member

pdurbin commented Apr 8, 2019

It's confusing. Can you please try something like...

http://localhost:8080/api/datasets/12345/citationdate?key=5bbeb877-6c74-4131-8144-fbcaa128344a

... where your replace 12345 with the database id of your dataset? You can see the database id in the URL when you go to edit dataset permissions. "159" in this screenshot:

Screen Shot 2019-04-08 at 3 05 48 PM

@MohanaPriyaNarapareddy
Copy link
Author

@pdurbin
I tried with the database id. I get the following error saying not found.
{
"status": "ERROR",
"message": "Dataset Field Type Name {"datasetVersion":{"termsOfUse":"CC0 Waiver","license":"CCO","protocol":"doi","authority":"10.7937","identifier":"K9/TCIA.2016.5DI84JS8","metadataBlocks":{"citation":{"fields":[{"typeName":"title","multiple":false,"value":"Glioma DSC-MRI Perfusion Data with Standard Imaging and ROIs","typeClass":"primitive"},{"typeName":"productionDate","multiple":false,"value":"2016","typeClass":"primitive"},{"typeName":"dsDescription","multiple":true,"typeClass":"compound","value":[{"dsDescriptionValue":{"typeName":"dsDescriptionValue","multiple":false,"typeClass":"primitive"}}]},{"typeName":"subject","multiple":true,"typeClass":"controlledVocabulary","value":["Medicine, Health and Life Sciences"]},{"typeName":"author","multiple":true,"typeClass":"compound","value":[{"authorName":{"typeName":"authorName","multiple":false,"value":"Schmainda, Kathleen M.","typeClass":"primitive"}},{"authorName":{"typeName":"authorName","multiple":false,"value":"Prah, Melissa A.","typeClass":"primitive"}},{"authorName":{"typeName":"authorName","multiple":false,"value":"Connelly, Jennifer M.","typeClass":"primitive"}},{"authorName":{"typeName":"authorName","multiple":false,"value":"Rand, Scott D.","typeClass":"primitive"}}]},{"typeName":"depositor","multiple":false,"value":"Admin,TCIA","typeClass":"primitive"},{"typeName":"datasetContact","multiple":true,"typeClass":"compound","value":[{"datasetContactEmail":{"typeName":"datasetContactEmail","multiple":false,"value":"help@cancerimagingarchive.net","typeClass":"primitive"}}]}],"displayName":"Citation Metadata"}}}}\n\n not found."
}

@pdurbin
Copy link
Member

pdurbin commented Apr 8, 2019

Ah, that's coming from here:

src/main/java/edu/harvard/iq/dataverse/api/Datasets.java
411:                    return badRequest("Dataset Field Type Name " + dsfTypeName + " not found.");

You have to pass it which field you want to use for the date. It's not a complete curl example.

There's a bit of a clue here: #2606 (comment)

@pdurbin
Copy link
Member

pdurbin commented Apr 8, 2019

This worked for me:

export API_TOKEN=1d02de58-04df-47fb-90ef-315edcf6cef1

curl -H "X-Dataverse-key:$API_TOKEN" -X PUT -d productionDate http://localhost:8080/api/datasets/10/citationdate

{"status":"OK","data":{"message":"Citation Date for dataset 10 set to: Production Date"}}

(It's ok to share my API token here because it's a dev server on my laptop.)

@MohanaPriyaNarapareddy can you please give this a try?

Definition of done for this issue is to document this better, obviously. In the docs we should also include a list of date fields you can use.

@MohanaPriyaNarapareddy
Copy link
Author

The command works. Thanks for the reply. I can now see the production date in the citation. But, Is there any way that I can edit the publication date or hide the publication date?

@pdurbin
Copy link
Member

pdurbin commented Apr 10, 2019

@MohanaPriyaNarapareddy can you please upload a screenshot to this issue? I'm not sure I understand what you're seeing. Thanks!

@MohanaPriyaNarapareddy
Copy link
Author

Screen Shot 2019-04-10 at 2 03 37 PM

@MohanaPriyaNarapareddy
Copy link
Author

I want to edit or hide the publication date which appears in the picture.

@pdurbin
Copy link
Member

pdurbin commented Apr 10, 2019

@MohanaPriyaNarapareddy I'm sorry but there is no way to hide Publication Date (or any metadata field) from the Metadata tab (or from the JSON and XML that comes out of "Export Metadata"). If you really want to change it, you will have to directly edit the database... but we never recommend this. Publication Date is not something you can edit. It is a timestamp from when you click "Publish".

@MohanaPriyaNarapareddy
Copy link
Author

Thanks for your reply.

@pdurbin
Copy link
Member

pdurbin commented Apr 11, 2019

@MohanaPriyaNarapareddy you're welcome. Would you like to make a pull request to improve the documentation? Here's the somewhat confusing documentation you were looking at: https://github.com/IQSS/dataverse/blob/v4.12/doc/sphinx-guides/source/api/native-api.rst#set-citation-date-field-for-a-dataset

@sharmaashish
Copy link

sharmaashish commented Jun 13, 2019

@pdurbin: @MohanaPriyaNarapareddy and our team were looking at the Publication Year, on the main Dataverse landing page — dataverse.cancerimagingarchive.net
We imported a few DOIs as we migrate from our homebrew system to Dataverse. The publication year shows up as 2019, but some of these DOIs were created in 2016, 2018, etc.

Is there a way for us to show the creation date on the main landing page? Otherwise, we will start showing a mass creation in 2019 and give the impression that no data was created pre-2019.

@pdurbin
Copy link
Member

pdurbin commented Jun 13, 2019

@sharmaashish hi! The only way I can think to fix this problem now that you seem to be in production is to hack on the "publicationdate" column of the "dvobject" table (highlighted in blue in the screenshot from http://phoenix.dataverse.org/schemaspy/latest/tables/dvobject.html below), followed by some reindexing: http://guides.dataverse.org/en/4.14/admin/solr-search-index.html

I hate suggesting database hacks like this so if you would like an API for this, please open a new issue.

Also, are you interested in adding https://dataverse.cancerimagingarchive.net to the map at https://dataverse.org and the metrics page at https://dataverse.org/metrics ? I hope so! The procedure is to email our support address, as explained at http://guides.dataverse.org/en/4.14/installation/config.html#putting-your-dataverse-installation-on-the-map-at-dataverse-org

Screen Shot 2019-06-13 at 12 11 33 PM

@jggautier
Copy link
Contributor

jggautier commented Jun 13, 2019

@sharmaashish when you write "Publication Year on the main Dataverse landing page," you mean the year in the dataset search cards that's below the dataset title, right?

Screen Shot 2019-06-13 at 12 56 20 PM

So for the dataset in the screenshot above, you'd want to show 2018, which is what's in that dataset's Production Date field.

When you Sort the results by "Newest," what's being used to sort is the date that the most recent major version of the dataset was published in the Dataverse installation (or if the dataset isn't published yet, the date that the dataset was created in the Dataverse installation ). @pdurbin, would this database hack affect that Sort order, too?

@sharmaashish
Copy link

No. I meant the year on the left panel of the main page.
Screen Shot 2019-06-13 at 12 39 04 PM

I think the publication date on the individual dataset is fine. It tells me when this dataset/DOI was updated (published with a new version).

@sharmaashish
Copy link

sharmaashish commented Jun 13, 2019

@pdurbin
Could one populate the main landing page with the createdate field instead of the publicationdate field http://phoenix.dataverse.org/schemaspy/latest/tables/dvobject.html

@sharmaashish
Copy link

@pdurbin Once this goes live (we just imported 4 or 5 datasets for our testing), we will email support and request that it be listed on the dataverse map.

@pdurbin
Copy link
Member

pdurbin commented Jun 13, 2019

Could one populate the main landing page with the createdate field instead of the publicationdate field

@sharmaashish if you want this, please create an issue for this. Are you saying you'd want something like a "Creation Year" facet like in the screenshot below?

Screen Shot 2019-06-13 at 12 57 18 PM

Once this goes live (we just imported 4 or 5 datasets for our testing), we will email support and request that it be listed on the dataverse map.

Fantastic!

@jggautier I'll swing by your office and explain. 😄

@sharmaashish
Copy link

Yes!!! How do I get this Creation Year? A new issue request, or a hidden tweak?

@pdurbin
Copy link
Member

pdurbin commented Jun 13, 2019

@sharmaashish a new issue request, please. 😄 That was just me hacking on https://demo.dataverse.org using a Chrome extension called VisBug: https://github.com/GoogleChromeLabs/ProjectVisBug

Here's VisBug in action:

Screen Shot 2019-06-13 at 1 03 16 PM

@pdurbin
Copy link
Member

pdurbin commented Oct 9, 2022

@sharmaashish thanks for creating this related issue:

@MohanaPriyaNarapareddy are you all set? Can we close this?

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