-
Notifications
You must be signed in to change notification settings - Fork 492
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
fix search files to return latest published citation #11051
fix search files to return latest published citation #11051
Conversation
📦 Pushed preview images as
🚢 See on GHCR. Use by referencing with full name as printed above, mind the registry name. |
@@ -1328,7 +1328,8 @@ public SolrInputDocuments toSolrDocs(IndexableDataset indexableDataset, Set<Long | |||
} | |||
LocalDate embargoEndDate=null; | |||
LocalDate retentionEndDate=null; | |||
final String datasetCitation = dataset.getCitation(); | |||
final String datasetCitation = (dataset.isReleased() && dataset.getReleasedVersion() != null) ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You wouldn't ever expect that a released dataset wouldn't have a released version unless maybe there's a deaccessioned version, maybe?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Is it worth fixing that documentation anomaly you noticed where we show a search result that illustrates the bug? Also probably need to update from dev and this will go in after 6.5 is releaesd
Fix looks good Screen.Recording.2024-12-20.at.10.39.18.AM.mov |
What this PR does / why we need it: Search should not return DRAFT information when a dataset is updated after publishing
Which issue(s) this PR closes:#10735
Special notes for your reviewer:
Suggestions on how to test this: Follow the steps listed in the issue.
open in browser: http://localhost:8080/api/v1/search?q=*&type=file&sort=date&order=desc&per_page=10&start=0&subtree=root
Does this PR introduce a user interface change? If mockups are available, please link/include them here: No
Is there a release notes update needed for this change?: Included
Additional documentation: