This pull request's diff hasn't been prepared yet. Log in with GitHub to have us prepare it for review.

DataCite XML should only report files in version #12823

Open
qqmyers opened 2:22pm on October 13, 2026 wants to merge 142 Ξ” into iqss/dataverse develop from
Fix-sizes-and-formatsin-DataCiteXML

Pull Request Overview

  • Opened on October 13, 2026
  • Status Open
  • Commit count 3 with first commit October 13, 2026

Total Delta

142 Total Diff Delta

Open Days

Open 16 weekdays

Test Delta

61 Diff Delta in Test Files
Breakdown by Phase

How long has this pull request spent in each phase of its lifecycle?

Data pending calculation for pull request

Author avatar

DataCite XML should only report files in version

What this PR does / why we need it: Since ~2024 when they were added, the sizes and formats elements of the DataCite XML have been getting values from all versions (dataset.getFiles()). This PR fixes them to get the list of files from getLatestVersionForCopy() (which is where all the other version specific metadata comes from.

Which issue(s) this PR closes:


  • Closes #

Special notes for your reviewer: FWIW: In trying to debug this I used the draft export API added in #11398 and realized it doesn't work for DataCiteXML (that PR notes that only the Croissant export was updated and new issues are needed for others). I haven't fixed that here either. As noted above, the XMLMetadataTemplate uses getLatestVersionForCopy() to retrieve a version, so the exporter is hardcoded to that version.

Suggestions on how to test this: Test included. Can check to see if the list of sizes and formats for a v2.0 dataset includes entries from files in v1.0 that were deleted. (Or includes entries added in a draft if you reexport the dataset.)

Does this PR introduce a user interface change? If mockups are available, please link/include them here:

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

Additional documentation:

No comments have been left on this PR.