Skip to content

/api/guestbooks/{id}/responses returns responses but pagination.totalResponses is 0 #12523

Description

@ekraffmiller

What steps does it take to reproduce the issue?
Create a guestbook in the root collection
Create a subcollection, and include the inherited guestbook in the subcollection
Create a Dataset in the subcollection with the guesbook required
Download from the Dataset, to generate a guestbook response.

Call GET /api/guestbooks/{id}/responses?limit=10&offset=0
It will return the response, but the pagination object is:
"pagination": {
"totalResponses": 0
}
This is because the pagination totalResponses is set based on the number of responses in the guestbook owner collection (root), not in the subcollection.

To correct this issue:
Add a parameter to the endpoint, specifying the collectionId for the guestbook responses.

  • When does this issue occur?
    Getting guestbook responses for an inherited guestbook.

  • Which page(s) does it occurs on?
    API

  • What happens?
    Call GET /api/guestbooks/{id}/responses?limit=10&offset=0
    It will return the response, but the pagination object is:
    "pagination": {
    "totalResponses": 0
    }

  • To whom does it occur (all users, curators, superusers)?
    all

  • What did you expect to happen?
    pagination totalResponses should match the responses returned.

Which version of Dataverse are you using?
6.11

Any related open or closed issues to this bug report?

Screenshots:

No matter the issue, screenshots are always welcome.

To add a screenshot, please use one of the following formats and/or methods described here:

Are you thinking about creating a pull request for this issue?
Help is always welcome, is this bug something you or your organization plan to fix?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Feature: GuestbookGREI Re-archIssues related to the GREI Dataverse rearchitectureSPAThese changes are required for the Dataverse SPASize: 30A percentage of a sprint. 21 hours. (formerly size:33)Type: Buga defect

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    Status
    This Sprint 🏃‍♀️ 🏃

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions