IQSS-5505 - only update DOI metadata at PIDprovider when it changes
New Contributors
Welcome! New contributors should at least glance at CONTRIBUTING.md, especially the section on pull requests where we encourage you to reach out to other developers before you start coding. Also, please note that we measure code coverage and prefer you write unit tests. Pull requests can still be reviewed without tests or completion of the checklist outlined below. Thanks!
Related Issues
- closes #5505 Update modifyRegistration API calls to only update when necessary
Pull Request Checklist
- [ ] Unit tests completed
- [ ] Integration tests: None
- [ ] Deployment requirements, SQL updates, Solr updates, etc.: None
- [ ] Documentation completed
- [ ] Merged latest from "develop" branch and resolved conflicts
coverage: 20.699% (-0.01%) from 20.709% when pulling 912a15c66486addb9108fc36e2d2633afe50a587 on QualitativeDataRepository:5505-Update_modifyRegistration_API_calls_to_only_update_when_necessary into 9bda7dddb5c3d49ca7d8dfdc40f5089486c03671 on IQSS:develop.
@sekmiller - maybe some renaming/refactoring is in order: right now there are /modifyRegistration and /modifyRegistrationAll calls that invoke UpdateDatasetTargetURLCommand which updates both the targetURL and metadata (two API calls) without checking the current values (I haven't changed these). Then there are the /modifyRegistrationMetadata and /modifyRegistrationPIDMetadataAll calls which invoke UpdateDvObjectPIDMetadataCommand which also updates the targetUrl and metadata, which I've modified to check current values (just for DataCite). If a fast way to modify just the targetURLs is needed, the former could drop its second call to replace the metadata. Or we could rename these two sets of calls to be the always modify and modify if needed calls. Or both - make one set just push a new target while the other updates targetUrl and/or metadata as needed. I'm open to these or other options - just let me know what fits the use cases best.
Can one of the admins verify this patch?
Note in #6845 - @landreev comments just mentioned not updating file DOIs on version updates if that's not needed. This PR would do that. The discussion that has this PR in limbo is about how to expose this capability in the API. That's potentially separable, but also something we could probably figure out an answer for without too much trouble.
I just noticed that @jggautier mentioned the issue that this pull request closes at https://github.com/IQSS/dataverse/issues/5144#issuecomment-1039270678
It looks like it has merge conflicts, though.
Looking good so far!