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

Adjust Metrics API's "metrics/filedownloads" endpoint to include downloads where download date is unknown #10911

Open
jggautier opened this issue Oct 7, 2024 · 0 comments

Comments

@jggautier
Copy link
Contributor

jggautier commented Oct 7, 2024

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 23 (as of 2024-10-24).

    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 13 downloads for that file.

    The 10 missing downloads may be the 10 downloads for which Harvard Dataverse has no download dates. 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.3

Any related open or closed issues to this bug report?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant