Skip to content

Expose Collection guestbookRoot setting through API - #12611

Open
stevenwinship wants to merge 8 commits into
developfrom
12450-expose-collection-guestbook-root-setting
Open

Expose Collection guestbookRoot setting through API#12611
stevenwinship wants to merge 8 commits into
developfrom
12450-expose-collection-guestbook-root-setting

Conversation

@stevenwinship

@stevenwinship stevenwinship commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

What this PR does / why we need it: SPA needs the ability to view and modify the "guestbookRoot" setting of a Collection

Which issue(s) this PR closes:#12459

Special notes for your reviewer:

Suggestions on how to test this:See DatasetsIT. Make call to create/update dataverse and verify the setting.

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:

https://dataverse-guide--12611.org.readthedocs.build/en/12611/api/native-api.html#create-a-dataverse-collection

@stevenwinship stevenwinship self-assigned this Aug 13, 2026
@github-actions github-actions Bot added Feature: Guestbook FY27 Sprint 4 FY27 Sprint 4 (2026-08-12 - 2026-08-26) GREI Re-arch Issues related to the GREI Dataverse rearchitecture Size: 10 A percentage of a sprint. 7 hours. SPA These changes are required for the Dataverse SPA labels Aug 13, 2026
@stevenwinship stevenwinship moved this to In Progress 💻 in IQSS Dataverse Project Aug 13, 2026
@stevenwinship stevenwinship added this to the 6.12 milestone Aug 13, 2026
@coveralls

coveralls commented Aug 13, 2026

Copy link
Copy Markdown

Coverage Status

Coverage is 25.291%12450-expose-collection-guestbook-root-setting into develop. No base build found for develop.

@github-actions

This comment has been minimized.

1 similar comment
@github-actions

This comment has been minimized.

@github-actions

github-actions Bot commented Aug 13, 2026

Copy link
Copy Markdown

Test Results

405 tests  +1   390 ✅ +1   25m 24s ⏱️ - 8m 9s
 55 suites ±0    15 💤 ±0 
 55 files   ±0     0 ❌ ±0 

Results for commit a01ccfa. ± Comparison against base commit 2a71d2d.

♻️ This comment has been updated with latest results.

@github-actions

This comment has been minimized.

1 similar comment
@github-actions

This comment has been minimized.

@stevenwinship stevenwinship moved this from In Progress 💻 to Ready for Review ⏩ in IQSS Dataverse Project Aug 13, 2026
@stevenwinship stevenwinship removed their assignment Aug 13, 2026
@stevenwinship
stevenwinship force-pushed the 12450-expose-collection-guestbook-root-setting branch from 92713c8 to b707c45 Compare August 14, 2026 19:13
@github-actions

This comment has been minimized.

@rtreacy rtreacy self-assigned this Aug 24, 2026
@rtreacy rtreacy moved this from Ready for Review ⏩ to In Review 🔎 in IQSS Dataverse Project Aug 24, 2026
Comment thread src/main/java/edu/harvard/iq/dataverse/util/json/JsonParser.java
@github-actions

This comment has been minimized.

2 similar comments
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@rtreacy

rtreacy commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Review follow-up summary

Reviewed this PR and worked through the follow-ups for @stevenwinship — everything's now resolved:

  • Create-path test coverage (was missing): added testCreateDataverseWithGuestbookRoot in DataversesIT covering POST /api/dataverses both with guestbookRoot omitted (defaults false) and explicitly set to truee0ba0d4c0b.
  • Duplicate mutation path (non-blocking note): flagged that guestbookRoot can now be set via both the existing UpdateDataverseGuestbookRootCommand (JSF guestbook page) and the new generic UpdateDataverseCommand DTO path (API). Not a bug — both just require EditDataverse and do a plain save — but worth keeping in mind if either path grows extra validation later.
  • SonarCloud quality gate (was failing at 68.8% new-code coverage, required ≥80%): added unit-test coverage for the new guestbookRoot branches in JsonParser (both the create-path parseDataverse and the DTO parseDataverseDTO, including the previously-untested "key absent" branch), JsonPrinter, and a new UpdateDataverseCommandTest covering both branches of updateDataverseFromDTO's guestbookRoot handling — 035065be4b, 190639ddbf.

All CI checks are now green, including the SonarCloud quality gate, and both review threads are marked resolved.

The only thing outstanding for merge is an approving review — this PR currently has no approvals (my review was comment-only) and no reviewers requested.

Comment on lines +15 to +16
"datasetFileCountLimit": 10,
"guestbookRoot": false

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

These should be documented in doc/sphinx-guides/source/api/native-api.rst

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.

added documentation

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@rtreacy rtreacy removed their assignment Aug 24, 2026
@rtreacy rtreacy moved this from In Review 🔎 to Ready for Review ⏩ in IQSS Dataverse Project Aug 24, 2026
@cmbz cmbz added the FY27 Sprint 5 FY27 Sprint 5 (2026-08-26 - 2026-09-09) label Aug 26, 2026
@stevenwinship
stevenwinship force-pushed the 12450-expose-collection-guestbook-root-setting branch from 190639d to d1e87c6 Compare August 31, 2026 13:03
@rtreacy rtreacy self-assigned this Aug 31, 2026

@rtreacy rtreacy left a comment

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.

Documentation added

@rtreacy rtreacy moved this from Ready for Review ⏩ to In Review 🔎 in IQSS Dataverse Project Aug 31, 2026
@github-actions

This comment has been minimized.

@rtreacy rtreacy moved this from In Review 🔎 to Ready for QA ⏩ in IQSS Dataverse Project Aug 31, 2026
@rtreacy rtreacy removed their assignment Aug 31, 2026
@rtreacy rtreacy moved this from Ready for QA ⏩ to In Review 🔎 in IQSS Dataverse Project Aug 31, 2026
@github-actions

This comment has been minimized.

@rtreacy rtreacy moved this from In Review 🔎 to Ready for QA ⏩ in IQSS Dataverse Project Aug 31, 2026
stevenwinship and others added 8 commits September 1, 2026 08:59
Covers POST /api/dataverses defaulting guestbookRoot to false when
omitted, and setting it to true when included in the request body.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Covers the new guestbookRoot branches in JsonParser.parseDataverse,
JsonParser.parseDataverseDTO, and JsonPrinter.json(Dataverse) with
unit-test assertions, to close the SonarCloud new-code coverage gap
left by the IT-only test.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
- JsonParserTest: cover the containsKey("guestbookRoot") false branch
  in parseDataverseDTO, which was previously only exercised with the
  key present.
- UpdateDataverseCommandTest: new unit test covering both branches of
  updateDataverseFromDTO's guestbookRoot handling (set vs. left
  unchanged), previously only covered indirectly by an IT test.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@stevenwinship
stevenwinship force-pushed the 12450-expose-collection-guestbook-root-setting branch from 75ff1f9 to a01ccfa Compare September 1, 2026 12:59
@sonarqubecloud

sonarqubecloud Bot commented Sep 1, 2026

Copy link
Copy Markdown

@github-actions

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown

📦 Pushed preview images as

ghcr.io/gdcc/dataverse:12450-expose-collection-guestbook-root-setting
ghcr.io/gdcc/configbaker:12450-expose-collection-guestbook-root-setting

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

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

Labels

Feature: Guestbook FY27 Sprint 4 FY27 Sprint 4 (2026-08-12 - 2026-08-26) FY27 Sprint 5 FY27 Sprint 5 (2026-08-26 - 2026-09-09) GREI Re-arch Issues related to the GREI Dataverse rearchitecture Size: 10 A percentage of a sprint. 7 hours. SPA These changes are required for the Dataverse SPA

Projects

Status: QA ✅

Development

Successfully merging this pull request may close these issues.

Expose Collection guestbookRoot setting through API

6 participants