Skip to content

Conversation

@ChengShi-1
Copy link
Contributor

@ChengShi-1 ChengShi-1 commented Jul 22, 2025

What this PR does / why we need it:

Inspired by 2025 Q3 SPA proposal, we could add the citation in other formats use case. Native API works

The return results have different content types, include 'EndNote' (XML), 'RIS' (plain text), 'BibTeX' (plain text), 'CSLJson' (JSON), and 'Internal' (HTML).
image

Which issue(s) this PR closes:

Related Dataverse PRs:

  • Depends on #

Special notes for your reviewer:

The use case will be used for citation downloads(like the screenshot). The return type is still String but in different Content-Types, I think it makes more sense to have an use case to fetch the information here, and write a file to download by users in the front end repo?

RoleHelper for testing changed because Revert "feat: "Link Dataset/Dataverse" permission"

Suggestions on how to test this:

Is there a release notes update needed for this change?:

Additional documentation:

@github-actions github-actions bot added FY26 Sprint 2 FY26 Sprint 2 (2025-07-16 - 2025-07-30) GREI Re-arch GREI re-architecture-related SPA.Q3.2025.15 Dataset Page: Cite Dataset Download SPA: Dataset View Page labels Jul 22, 2025
@ChengShi-1 ChengShi-1 moved this to In Progress 💻 in IQSS Dataverse Project Jul 22, 2025
@ChengShi-1 ChengShi-1 added Size: 3 A percentage of a sprint. 2.1 hours. Original size: 3 labels Jul 22, 2025
@ChengShi-1 ChengShi-1 closed this Jul 23, 2025
@ChengShi-1 ChengShi-1 removed Size: 3 A percentage of a sprint. 2.1 hours. SPA: Dataset View Page GREI Re-arch GREI re-architecture-related Original size: 3 FY26 Sprint 2 FY26 Sprint 2 (2025-07-16 - 2025-07-30) SPA.Q3.2025.15 Dataset Page: Cite Dataset Download labels Jul 23, 2025
@ChengShi-1 ChengShi-1 reopened this Jul 23, 2025
@ChengShi-1 ChengShi-1 self-assigned this Jul 23, 2025
@ChengShi-1 ChengShi-1 moved this to In Progress 💻 in IQSS Dataverse Project Jul 23, 2025
@ChengShi-1 ChengShi-1 added Size: 3 A percentage of a sprint. 2.1 hours. SPA: Dataset View Page GREI Re-arch GREI re-architecture-related Original size: 3 FY26 Sprint 2 FY26 Sprint 2 (2025-07-16 - 2025-07-30) SPA.Q3.2025.15 Dataset Page: Cite Dataset Download labels Jul 23, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces a new use case for retrieving dataset citations in various bibliographic formats (EndNote, RIS, BibTeX, CSLJson, Internal). The implementation follows the existing repository pattern and adds support for different content types including XML, plain text, JSON, and HTML formats.

  • Adds GetDatasetCitationInOtherFormats use case with support for 5 citation formats
  • Creates new domain models for citation formats and response structure
  • Implements repository method with optional deaccessioned dataset inclusion

Reviewed Changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/datasets/domain/models/CitationFormats.ts Defines enum for supported citation formats
src/datasets/domain/models/CitationResponse.ts Type definition for citation response with content and content type
src/datasets/domain/useCases/GetDatasetCitationInOtherFormats.ts Main use case implementation for retrieving citations
src/datasets/domain/repositories/IDatasetsRepository.ts Interface update to include new citation method
src/datasets/infra/repositories/DatasetsRepository.ts Repository implementation with API endpoint integration
test/unit/datasets/GetDatasetCitationInOtherFormats.test.ts Unit tests for the new use case
test/integration/datasets/DatasetsRepository.test.ts Integration tests covering all citation formats
docs/useCases.md Documentation for the new use case
test/testHelpers/roles/roleHelper.ts Removes deprecated 'LinkDataverse' and 'LinkDataset' permissions

@ekraffmiller ekraffmiller self-assigned this Jul 28, 2025
@ekraffmiller ekraffmiller moved this from Ready for Review ⏩ to In Review 🔎 in IQSS Dataverse Project Jul 28, 2025
Copy link
Contributor

@ekraffmiller ekraffmiller 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! I just have suggestions for naming and the domain model.

@cmbz cmbz added the FY26 Sprint 3 (2025-07-30 - 2025-08-13) label Jul 31, 2025
@ChengShi-1
Copy link
Contributor Author

@ekraffmiller Thanks for suggestions, Ellen! just fixed names and stringify json object

ekraffmiller
ekraffmiller previously approved these changes Jul 31, 2025
Copy link
Contributor

@ekraffmiller ekraffmiller 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, approved!

@ChengShi-1
Copy link
Contributor Author

ChengShi-1 commented Aug 5, 2025

@ekraffmiller Hi Ellen, I add one commit for exporting this use case in dataset/index.ts, and allow persistent id. Could you check and approve it again? Thanks!

@ChengShi-1 ChengShi-1 requested a review from ekraffmiller August 5, 2025 14:12
@ChengShi-1 ChengShi-1 moved this from Ready for QA ⏩ to Ready for Review ⏩ in IQSS Dataverse Project Aug 5, 2025
Copy link
Contributor

@ekraffmiller ekraffmiller 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, approved 👍

@github-project-automation github-project-automation bot moved this from Ready for Review ⏩ to Ready for QA ⏩ in IQSS Dataverse Project Aug 6, 2025
@ofahimIQSS
Copy link
Contributor

tests passing, merging

@ofahimIQSS ofahimIQSS merged commit 8c14fdf into develop Aug 13, 2025
5 checks passed
@github-project-automation github-project-automation bot moved this from Ready for QA ⏩ to Merged 🚀 in IQSS Dataverse Project Aug 13, 2025
@ofahimIQSS ofahimIQSS deleted the Citation-in-other-format branch August 13, 2025 17:12
@scolapasta scolapasta moved this from Merged 🚀 to Done 🧹 in IQSS Dataverse Project Aug 14, 2025
@ChengShi-1 ChengShi-1 restored the Citation-in-other-format branch August 14, 2025 16:17
@cmbz cmbz added the FY26 Sprint 4 FY26 Sprint 4 (2025-08-13 - 2025-08-27) label Aug 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

FY26 Sprint 2 FY26 Sprint 2 (2025-07-16 - 2025-07-30) FY26 Sprint 3 (2025-07-30 - 2025-08-13) FY26 Sprint 4 FY26 Sprint 4 (2025-08-13 - 2025-08-27) GREI Re-arch GREI re-architecture-related Original size: 3 Size: 3 A percentage of a sprint. 2.1 hours. SPA: Dataset View Page SPA.Q3.2025.15 Dataset Page: Cite Dataset Download

Projects

Status: Done 🧹

Development

Successfully merging this pull request may close these issues.

Get Citation In Other Formats Use Case

5 participants