Skip to content

Add usage and response counts to get guestbooks list#12269

Open
stevenwinship wants to merge 2 commits intodevelopfrom
12260-get-guestbook-with-usage-and-response-counts
Open

Add usage and response counts to get guestbooks list#12269
stevenwinship wants to merge 2 commits intodevelopfrom
12260-get-guestbook-with-usage-and-response-counts

Conversation

@stevenwinship
Copy link
Copy Markdown
Contributor

@stevenwinship stevenwinship commented Mar 31, 2026

What this PR does / why we need it:Currently, the GET Guestbook API returns metadata about guestbooks (e.g., name, required fields, custom questions), but it does not include usage and responses, needed for Manage Guestbooks table

Which issue(s) this PR closes:#12260

Special notes for your reviewer:

Suggestions on how to test this:

Does this PR introduce a user interface change? If mockups are available, please link/include them here:

Is there a release notes update needed for this change?: Included

Additional documentation:

@stevenwinship stevenwinship self-assigned this Mar 31, 2026
@github-actions github-actions bot added FY26 Sprint 20 FY26 Sprint 20 (2026-03-26 - 2026-04-08) Size: 10 A percentage of a sprint. 7 hours. SPA These changes are required for the Dataverse SPA labels Mar 31, 2026
@stevenwinship stevenwinship moved this to In Progress 💻 in IQSS Dataverse Project Mar 31, 2026
@github-actions github-actions bot added the Type: Feature a feature request label Mar 31, 2026
@stevenwinship stevenwinship changed the title Add usage and response counts to get guestbook Add usage and response counts to get guestbooks list Mar 31, 2026
@github-actions

This comment has been minimized.

1 similar comment
@github-actions
Copy link
Copy Markdown

📦 Pushed preview images as

ghcr.io/gdcc/dataverse:12260-get-guestbook-with-usage-and-response-counts
ghcr.io/gdcc/configbaker:12260-get-guestbook-with-usage-and-response-counts

🚢 See on GHCR. Use by referencing with full name as printed above, mind the registry name.

@stevenwinship stevenwinship moved this from In Progress 💻 to Ready for Review ⏩ in IQSS Dataverse Project Mar 31, 2026
@stevenwinship stevenwinship removed their assignment Mar 31, 2026
Copy link
Copy Markdown
Contributor

@scolapasta scolapasta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left one comment about the default for discussion.

Also branch is out of date.

JsonArrayBuilder guestbookArray = Json.createArrayBuilder();
JsonPrinter jsonPrinter = new JsonPrinter();
for (Guestbook gb : guestbooks) {
// default is to include the stats. Ignore the stats for a faster reply if they are not needed
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason that the default is to include the stats? generally, faster defaults are "better" (for some definition of that word) and then you add the parameter if you need the slower.

If we do change the parameter should naturally be "includeStats". (I would even think we could consider the name change if we don't, partially in case we someday decide to change the default, the name works better for both cases, imo)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since JSF includes the stats by default I wanted the API to match. Most of the time the stats are desired. I just added a way to exclude them if someone didn't want them or just wanted a faster listing

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I could just leave it out and always include the stats

@scolapasta scolapasta moved this from Ready for Review ⏩ to In Review 🔎 in IQSS Dataverse Project Apr 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

FY26 Sprint 20 FY26 Sprint 20 (2026-03-26 - 2026-04-08) Size: 10 A percentage of a sprint. 7 hours. SPA These changes are required for the Dataverse SPA Type: Feature a feature request

Projects

Status: In Review 🔎

Development

Successfully merging this pull request may close these issues.

API: Enhance GET Guestbooks with usage count and response count fields

2 participants