Feature Request: API Endpoint Request: Fetch Dataset comments from WorkflowComment Table
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 1.1k
- Forks
- 564
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 29
Description
Overview of the Feature Request
We are developing a frontend application to add datasets to our Dataverse installation using the Dataverse API. During the dataset publication process, if a dataset review is returned to the author (contributor) by the curator with a custom reason, this reason is currently only communicated via email. However, we need to retrieve this review comment directly from the Dataverse database and display it in our frontend application.
The review comments are stored in the WorkflowComment table with the type "RETURN_TO_AUTHOR", but there is currently no API endpoint to fetch them.
What kind of user is the feature intended for?
API User
What inspired the request?
Implementing a custom UI using Dataverse API, we need to show a contributor the reason why a Dataset in review was returned by the curator.
Any brand new behavior do you want to add to Dataverse?
Yes, following the principle API-first we propose adding the ability to retrieve review comments via API. This will allow contributors to see the feedback directly within the application, instead of relying solely on email notifications. This change enhances transparency and improves the user experience.
Proposed Solution: We propose adding a new API endpoint that returns all comments related to a DatasetVersion.
-
Suggested endpoint location:
Datasets.javawithin the API path/versions -
Example endpoint structure: '
{id}/versions/{versionId}/workflowComments
Considerations:
If WorkflowComment is a strong entity that may relate to other types of entities beyond DatasetVersion, the endpoint might need to be placed in a different location. Based on the comment in WorkflowComment.java, the entity is currently used exclusively for dataset version discussions, but future enhancements may extend its use to files or datasets.
/**
* Right now only datasetVersions are the only supported entity that can be
* discussed via workflow comments. In the future, we plan to also use this
* table for discussion of other entities such as files in the "Request
* Access" workflow. We may even allow for discussion of datasets to allow
* users to explain why they'd like to have a contributor role on a dataset.
*/
Another possible solution could be to include WorkflowComment data alongside the rest of the DatasetVersion details in the existing GET endpoint used to retrieve a DatasetVersion. This approach would allow clients to access the comments without making an additional request.
Any open or closed issues related to this feature request?
- #3943
Are you thinking about creating a pull request for this feature?
Our team is willing to help with this new feature once Dataverse team properly defines where to add it.
Thank you for considering this feature request!
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 in Datasets.java under the /versions API and read WorkflowComment.java, including its documented relationship to DatasetVersion. Review related issue #3943 and decide whether comments belong in a dedicated workflowComments endpoint or DatasetVersion response; done means the chosen API path returns the relevant WorkflowComment records for a DatasetVersion.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api, backend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100