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

Add total file count to GetDatasetFiles use case #109

Closed
GPortas opened this issue Dec 22, 2023 · 2 comments · Fixed by #116
Closed

Add total file count to GetDatasetFiles use case #109

GPortas opened this issue Dec 22, 2023 · 2 comments · Fixed by #116
Assignees
Labels
pm.GREI-d-2.7.1 NIH, yr2, aim7, task1: R&D UI modules for creating datasets and supporting publishing workflows pm.GREI-d-2.7.2 NIH, yr2, aim7, task2: Implement UI modules for creating datasets and publishing workflows Size: 3 A percentage of a sprint. 2.1 hours.

Comments

@GPortas
Copy link
Contributor

GPortas commented Dec 22, 2023

Overview of the Feature Request

As for the Dataset previews, the GetDatasetFiles should be extended to return the total file count, which is necessary for pagination.

We should follow the same implementation as for DatasetPreviewSubset.

This feature depends on: IQSS/dataverse#10202

What kind of user is the feature intended for?

  • Use case consumer

What inspired the request?

What existing behavior do you want changed?

GetDatasetFiles use case to include total file count

Any brand new behavior do you want to add to Dataverse?

None

Any open or closed issues related to this feature request?

@GPortas GPortas added Size: 3 A percentage of a sprint. 2.1 hours. pm.GREI-d-2.7.1 NIH, yr2, aim7, task1: R&D UI modules for creating datasets and supporting publishing workflows pm.GREI-d-2.7.2 NIH, yr2, aim7, task2: Implement UI modules for creating datasets and publishing workflows labels Dec 22, 2023
@GPortas
Copy link
Contributor Author

GPortas commented Dec 22, 2023

Waiting. This feature depends on: IQSS/dataverse#10202

@cmbz cmbz moved this to SPRINT READY in IQSS Dataverse Project Jan 3, 2024
@GPortas GPortas moved this from SPRINT READY to This Sprint 🏃‍♀️ 🏃 in IQSS Dataverse Project Jan 3, 2024
@GPortas GPortas removed the Waiting label Jan 11, 2024
@MellyGray MellyGray moved this from This Sprint 🏃‍♀️ 🏃 to In Progress 💻 in IQSS Dataverse Project Jan 16, 2024
@MellyGray MellyGray self-assigned this Jan 16, 2024
@MellyGray
Copy link
Contributor

The issue to extend the API is already merged but I can't get the totalCount from the API using curl "http://localhost:8000/api/datasets/306/versions/1.0/files"

I'm using the docker image with the unstable tag

(base) melina@MacBook-Air-de-Melina dataverse-frontend % curl "http://localhost:8000/api/datasets/306/versions/1.0/files"
{"status":"OK","data":[{"description":"This is an example file","label":"blob","restricted":false,"version":1,"datasetVersionId":92,"dataFile":{"id":307,"persistentId":"","filename":"blob","contentType":"text/plain","friendlyType":"Plain Text","filesize":57,"description":"This is an example file","storageIdentifier":"local://18d13201d79-f33543ee5372","rootDataFileId":-1,"md5":"5637c04c37f35b4be92821acd86dbfba","checksum":{"type":"MD5","value":"5637c04c37f35b4be92821acd86dbfba"},"tabularData":false,"creationDate":"2024-01-16","publicationDate":"2024-01-16","fileAccessRequest":true}},{"description":"This is an example file","label":"blob-1","restricted":false,"version":1,"datasetVersionId":92,"dataFile":{"id":308,"persistentId":"","filename":"blob-1","contentType":"text/plain","friendlyType":"Plain Text","filesize":60,"description":"This is an example file","storageIdentifier":"local://18d13201e70-7f03666e8155","rootDataFileId":-1,"md5":"b32c0efc5ac0d40146c9657dc1212d42","checksum":{"type":"MD5","value":"b32c0efc5ac0d40146c9657dc1212d42"},"tabularData":false,"creationDate":"2024-01-16","publicationDate":"2024-01-16","fileAccessRequest":true}},{"description":"This is an example file","label":"blob-2","restricted":false,"version":1,"datasetVersionId":92,"dataFile":{"id":309,"persistentId":"","filename":"blob-2","contentType":"text/plain","friendlyType":"Plain Text","filesize":40,"description":"This is an example file","storageIdentifier":"local://18d13202011-d3d812463373","rootDataFileId":-1,"md5":"5ebb5c1c15e5f8163f2a76efba6fd109","checksum":{"type":"MD5","value":"5ebb5c1c15e5f8163f2a76efba6fd109"},"tabularData":false,"creationDate":"2024-01-16","publicationDate":"2024-01-16","fileAccessRequest":true}}]}% 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pm.GREI-d-2.7.1 NIH, yr2, aim7, task1: R&D UI modules for creating datasets and supporting publishing workflows pm.GREI-d-2.7.2 NIH, yr2, aim7, task2: Implement UI modules for creating datasets and publishing workflows Size: 3 A percentage of a sprint. 2.1 hours.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants