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

reExportAll does not respect the exclusion of email addresses of dataset contacts from metadata export when it should according to the configuration #4683

Closed
PaulBoon opened this issue May 17, 2018 · 8 comments
Assignees

Comments

@PaulBoon
Copy link
Contributor

When disabling the export of email adresses in the metadata export on a existing system, we set :ExcludeEmailFromExport to true.

Newly published datasets get the correct metadata export, without the emails in DDI and JSON.
To clean all existing metadataexports, all published datasets need to be reexported.

However, after running curl http://localhost:8080/api/admin/metadata/reExportAll
the existing metadata exports are not changed, and for the new datasets the email adresses are back in the metadata exports.

@pdurbin
Copy link
Member

pdurbin commented May 17, 2018

@PaulBoon thanks for the bug report. If it helps, here's where the "exclude" logic is applied:

https://github.com/IQSS/dataverse/blob/v4.8.6/src/main/java/edu/harvard/iq/dataverse/util/DatasetFieldWalker.java#L86

I'm surprised that the logic above isn't used by reExportAll. It must be a different code path.

@PaulBoon
Copy link
Contributor Author

PaulBoon commented May 17, 2018

Yes it's strange that it's not working, maybe it doesn't get the settings somehow. But I would like to have someone else confirm the bug, just to be sure that it's not only me or I am not doing something right here.

@pameyer
Copy link
Contributor

pameyer commented May 17, 2018

On 4.8.1, I can confirm that running curl http://localhost:8080/api/admin/metadata/reExportAll results in email addresses being included in the cached export files.

@pameyer
Copy link
Contributor

pameyer commented May 17, 2018

From preliminary additional investigation, I'm wondering if this behaviour could be related to API calls ending up in JsonPrinter with null SettingsServiceBean (assuming that's a condition that's actually occurring here).

@PaulBoon
Copy link
Contributor Author

Looks like it needs a bit of debugging to confirm its the null SettingsServiceBean. BTW I am running a fork of 4.8.6.

@pdurbin
Copy link
Member

pdurbin commented May 18, 2018

While I was reviewing pull request #4691 I noticed that the deprecated ExportService.getInstance().getExport(dataset, formatName) method that doesn't pass in the SettingsServiceBean is still being called in four places:

screen shot 2018-05-18 at 12 15 46 pm

@sekmiller
Copy link
Contributor

I fixed the two references to the deprecated version of the ExportService.getInstance() that @pdurbin noted above. This fixes the export All bug. The one in the ExportService itself can be called with a null parameter since it's just getting the names of the Exporters to display in the UI.

I didn't fix the one in Xrecord since it's a POJO. @landreev can you take a look at it and see if it needs to be fixed.

@landreev
Copy link
Contributor

@sekmiller @kcondon
About calling export from Xrecord - I believe it's ok; because the OAI server only handles the metadata records for the datasets that appear in the OAI sets. And only the datasets that have already been successfully exported are included in OAI sets...

So, in other words, this call from the OAI server should always be getting a cached copy.

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

No branches or pull requests

7 participants