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

Push selected publications to orcid #351

Open
wants to merge 25 commits into
base: dspace-cris-2023_02_x
Choose a base branch
from

Conversation

floriangantner
Copy link

@floriangantner floriangantner commented Jul 3, 2023

References

Description

Push SELECTED (MY_SELECTED) and not hidden (MINE) Publications settings to some person orcid profile. The items are determined through the regarding relationshiptypes which allows the user to hide/show the publications on certain relation boxes.

Instructions for Reviewers

List of changes in this PR:

  • Change OrcidQueueService to check the settings of the user
  • If the item passes the rules for MINE or MY_SELECTED options is is added to the orcid queue.
  • If the queue is recalculated because the sync options change, it also considers MINE and MY_SELECTED options for the new calculated queue.
  • orcid.cfg: additional properties to determine the Relationship which handle the sync preference. The name of the leftwardType is being used as the value, e.g.
orcid.relation.Publication.MINE = isResearchoutputsHiddenFor
orcid.relation.Publication.MINE.exclusion = true
orcid.relation.Publication.MY_SELECTED = isResearchoutputsSelectedFor

Some additional .exclusion configuration is used when the relation should not exist (e.g. show not publications which are hidden) and adds some negation to the solr filter/check for the relations.

  • Pass through context for the service where necessary
  • Extended orcidqueueconsumer to delete existing orcidqueue entries when the entry isAlreadyQueued. Some new method was introduced which uses the relationshipService to determine, if the relation was removed/added and the orcid sync settings (MINE/MY_SELECTED) are not in sync. In this cases the orcidqueue entry is deleted.

Include guidance for how to test or review your PR.

  • Set up some basic settings (profile connected with orcid, profile user author of some publications)
  • set up selected or hidden relationship (isResearchoutputsHiddenFor etc...) between person and publications
  • Recalculate the queue on the profile orcid page for the settings.
  • add some selected relationship and remove another selected relationship and see whether the orcid queue recalculates.

Counterpart:
4Science/dspace-angular#38

Checklist

This checklist provides a reminder of what we are going to look for when reviewing your PR. You need not complete this checklist prior to creating your PR (draft PRs are always welcome). If you are unsure about an item in the checklist, don't hesitate to ask. We're here to help!

  • My PR is small in size (e.g. less than 1,000 lines of code, not including comments & integration tests). Exceptions may be made if previously agreed upon.
  • My PR passes Checkstyle validation based on the Code Style Guide.
  • My PR includes Javadoc for all new (or modified) public methods and classes. It also includes Javadoc for large or complex private methods.
  • My PR passes all tests and includes new/updated Unit or Integration Tests based on the Code Testing Guide.
  • If my PR includes new libraries/dependencies (in any pom.xml), I've made sure their licenses align with the DSpace BSD License based on the Licensing of Contributions documentation.
  • If my PR modifies REST API endpoints, I've opened a separate REST Contract PR related to this change.
  • If my PR includes new configurations, I've provided basic technical documentation in the PR itself.
  • If my PR fixes an issue ticket, I've linked them together.

for the orcid profiles owner with OrcidEntitySyncPreference MINE and MY_SELECTED for some entity an additional check was added.
The check uses the solr-search to determine, if the corresponding/linked item is among the hidden/preferred items of the orcid profile owner.
The solr query for the relation can be configured.
for the orcid profiles owner with OrcidEntitySyncPreference MINE and MY_SELECTED for some entity an additional check was added.
The check uses the solr-search to determine, if the corresponding/linked item is among the hidden/preferred items of the orcid profile owner.
The solr query for the relation can be configured.
…o dspace-cris-7-orcid-relpref

# Conflicts:
#	dspace-api/src/main/java/org/dspace/orcid/consumer/OrcidQueueConsumer.java
…and fundings sync settings"

This reverts commit d4861ec.
this can occur when some relation was removed (e.g. selected) which is not reflected to the orcid queue. The entry is only removen when the whole queue is recalculated
especially new introduced null checks
tests to check the creation of OrcidEntitySyncPreference MINE and MY_SELECTED with different configuration settings and test cases as well as new tests on changes on the recalculation of the orcid queue with these new settings
@floriangantner floriangantner changed the title WIP: Push selected orcid works Push selected orcid works Aug 18, 2023
@floriangantner floriangantner marked this pull request as ready for review August 18, 2023 15:59
@floriangantner floriangantner changed the title Push selected orcid works Push selected publications to orcid Aug 18, 2023
use database-approach instead of solr because the values might not be indexed/remodev when the orcidconsumer interacts; simplify configuration to name of relationship instead of filter; some fixes and tests
check if relationship exist using the relationshipservice rather than the search, becaude the requested item might not have been indexed yet if it is recent archived
@floriangantner floriangantner changed the base branch from dspace-cris-7 to main-cris February 20, 2024 13:19
@floriangantner
Copy link
Author

Aligned to 2023.02.02 Release

@floriangantner floriangantner changed the base branch from main-cris to dspace-cris-2023_02_x April 9, 2024 09:58
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

Successfully merging this pull request may close these issues.

Push selected publications to orcid
1 participant