dataverse
dataverse copied to clipboard
Template Auto Fill "Affiliation" leaves "Name" Blank When Creating a Dataset
I created a template: https://dataverse-demo.iq.harvard.edu/template.xhtml?id=16&ownerId=1371&editMode=METADATA called Panda1
that has the "Affiliation" field populated (the one in the Author block). When this dataset template is used, the "Name" field is not autofilled as expected:
If a dataset template is not chosen, the Name is auto-filled.
This was in v. 4.2 build 92-d6443eb
This is not a new thing - it goes back to 4.0. We treat Author name and affiliation as a unit when it comes to the auto-fill, that is if the template leaves them both blank we will fill in both from the user account. If either or both is filled in by the selected template then we use what is in the template. We could add logic such that if the affiliation is set by the template we would still get the name from the user account. How should we handle the situation where the template fills in the Author's name, but leaves the affiliation blank?
Thinking out loud: a template could have variables (%name%
, %affiliation%
) to explicitly say "use the user's name" or "use the logged-in user's affiliation" or special values (*
) to say "not defined here, use whatever".
This doesn't necessarily make it easier to create or maintain templates though. :)
I agree with Stephen's explanation--when you initially create an account and go to create a dataset, the author and affiliation should show up as borrowed from the account creation page. However, templates should not prefill authors as it's unknown who is completing a template at any given time, and if the dataset will belong to the account holder. This is hard to predetermine.
I was looking at dataset templates on dvn-build and dataverse-internal test servers running 4.8.3, and did not see this issue.
@shlake - please let us know if you see this still. @kcondon - I recommend we close this if it is no longer reproducible.
I let @mheppler know this appears to be reproducible on Harvard Dataverse, 4.8.3.
Thought it might be helpful to add some use cases for why this might be useful. @shlake, @sbarbosadataverse and others who use and recommend templates often, are these valid (i.e. practical) use-cases?:
- I want my students or research team members who are depositing datasets into my dataverse to use the same affiliation (as well as some other metadata), so I create a template with the affiliation I want them to use and leave the author name field empty. But when they use the template, their name isn’t pulled from their account, so they always have to type it, which is another step I’d like to cut and can contribute to inconsistent names.
(I could make sure all depositors have the same affiliation name in their account info. But they each might have good reasons for having different affiliations.)
- I'm a researcher in two different groups. So I make two templates for the research I do in each group, with different author affiliation metadata (and other metadata). I leave the author name empty because I assume it'll be pulled from my account info, but after using one of the templates, I see it's not and I have to type in my name. (After that, I could just include my name in both templates.)
templates should not prefill authors as it's unknown who is completing a template at any given time, and if the dataset will belong to the account holder
If we were to stop prefilling authors for templates, wouldn't it make sense to also stop prefilling authors for non-templates, for the regular "create dataset" experience? I'm not sure why we would treat templates differently than the regular "create dataset" workflow.
@pdurbin templates are different, in that you (often) create them for use by other people.
Yes. And by design, if the template includes any entries in the author field, the fields left empty in the template are not filled in by default (i.e. the data from the user creating the dataset.) We could change the logic so that if some fields are entered into the template any fields left blank by the template would be filled in with data from the user. Note that this logic also applies to “Dataset Contact”.
@shlake hi! Just checking in. Are you still interested in this? If so, do you have any more details or thoughts to share? Thanks.
Not interested any more. This was opened 7 years ago!! Longer than my memory. 😸
@shlake ok, closing! If anyone reading this is still interested, please open a fresh issue. Thanks!