Adjust Metrics API's "metrics/filedownloads" endpoint to include downloads where download date is unknown
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 1.1k
- Forks
- 564
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 29
Description
What steps does it take to reproduce the issue?
-
When does this issue occur?
When using the Metrics API's metrics/filedownloads endpoint to get the download counts of files where the download date is unknown, such as files in the ssda_ucla collection in Harvard Dataverse -
Which page(s) does it occurs on?
It occurs in the results of the Metrics API's metrics/filedownloads endpoint -
What happens?
The file download counts exclude downloads where the download date is unknown.For example, the download count of the file at https://doi.org/10.7910/DVN/SVJ4MQ/AJPQ5M is 30 (as of 2025-05-30).
But using the endpoint in the curl command
curl -H 'Accept:application/json' "https://dataverse.harvard.edu/api/info/metrics/filedownloads/?parentAlias=ssda_ucla" | jq '.data[] | select(.pid == "doi:10.7910/DVN/SVJ4MQ/AJPQ5M")'we see 16 downloads for that file.The 10 missing downloads may be the 10 downloads that Harvard Dataverse has no download dates for. For those 10 downloads, we can see in the repository database's "guestbook" table that the responsetime column is empty and we can see in the collection's guestbook CSV file that the "Date" column is empty.
-
To whom does it occur (all users, curators, superusers)?
All users -
What did you expect to happen?
The count would include downloads where the download date is unknown
Which version of Dataverse are you using?
v.6.6
Any related open or closed issues to this bug report?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the Metrics API metrics/filedownloads endpoint and compare its handling of downloads with unknown dates against issue #7909. Inspect the guestbook table's empty responsetime values and the collection guestbook CSV, then verify the endpoint's count for the cited DOI includes those downloads.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api, backend, databases
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100