Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Purpose
This pull request introduces a new facet for licenses in the DataCite DOIs controller that accounts for missing values. It enhances the faceting capabilities by enabling the retrieval of license identifiers along with an additional entry for licenses that are missing, thus providing a more comprehensive view of the licenses associated with DOIs.
Key Modifications:
New Facet Method:
facet_by_license_and_other
method in theFacetable
concern. This method aggregates license data and includes an additional entry for licenses that are missing.Updates in Controller:
DataciteDoisController
to include the newlicenses_with_missing
facet, mapping it to the newly created method.facets_to_bucket_path
to accommodate the new facet.Model Changes:
Doi
model to define thelicenses_with_missing
facet with a query for terms that includes a missing condition.Testing Additions:
licenses_with_missing
facet, confirming that it returns expected results when a DOI does not have a specified license.Technical Details:
facet_by_license_and_other
method consolidates the logic of faceting licenses while adding functionality to handle and display missing license identifiers.licenses_with_missing
in theDoi
model uses{ "missing": "__missing__" }
to effectively capture entries lacking a specified rights identifier.This PR aims to improve the usability and accuracy of license data in the DataCite system, allowing users to better understand the licensing landscape of DOIs.
Types of changes
Bug fix (non-breaking change which fixes an issue)
New feature (non-breaking change which adds functionality)
Breaking change (fix or feature that would cause existing functionality to change)
Reviewer, please remember our guidelines: