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

fix search files to return latest published citation #11051

Merged

Conversation

stevenwinship
Copy link
Contributor

@stevenwinship stevenwinship commented Nov 26, 2024

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:

@stevenwinship stevenwinship self-assigned this Nov 26, 2024
@stevenwinship stevenwinship added Original size: 10 FY25 Sprint 11 FY25 Sprint 11 (2024-11-20 - 2024-12-04) Type: Bug a defect Size: 10 A percentage of a sprint. 7 hours. and removed Original size: 10 labels Nov 26, 2024
@coveralls
Copy link

Coverage Status

coverage: 22.453% (-0.001%) from 22.454%
when pulling 1066b1e on 10735-search-dataset-name-and-dataset-citation-different
into 1c17c3e on develop.

Copy link

📦 Pushed preview images as

ghcr.io/gdcc/dataverse:10735-search-dataset-name-and-dataset-citation-different
ghcr.io/gdcc/configbaker:10735-search-dataset-name-and-dataset-citation-different

🚢 See on GHCR. Use by referencing with full name as printed above, mind the registry name.

@stevenwinship stevenwinship removed their assignment Nov 26, 2024
@cmbz cmbz added the FY25 Sprint 12 FY25 Sprint 12 (2024-12-04 - 2024-12-18) label Dec 5, 2024
@sekmiller sekmiller self-assigned this Dec 5, 2024
@@ -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) ?
Copy link
Contributor

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?

Copy link
Contributor

@sekmiller sekmiller left a 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

@sekmiller sekmiller removed their assignment Dec 6, 2024
@ofahimIQSS ofahimIQSS self-assigned this Dec 19, 2024
@ofahimIQSS
Copy link
Contributor

Fix looks good

Screen.Recording.2024-12-20.at.10.39.18.AM.mov

@ofahimIQSS ofahimIQSS removed their assignment Dec 20, 2024
@ofahimIQSS ofahimIQSS merged commit f7aabc8 into develop Dec 20, 2024
19 checks passed
@ofahimIQSS ofahimIQSS deleted the 10735-search-dataset-name-and-dataset-citation-different branch December 20, 2024 15:41
@pdurbin pdurbin added this to the 6.6 milestone Dec 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FY25 Sprint 11 FY25 Sprint 11 (2024-11-20 - 2024-12-04) FY25 Sprint 12 FY25 Sprint 12 (2024-12-04 - 2024-12-18) Size: 10 A percentage of a sprint. 7 hours. Type: Bug a defect
Projects
Status: Merged 🚀
Development

Successfully merging this pull request may close these issues.

Search API: File dataset_name and dataset_citation refer to different versions
6 participants