Skip to content

Conversation

@g-saracca
Copy link
Contributor

@g-saracca g-saracca commented Jul 31, 2025

What this PR does / why we need it:

Templates API fixes

  • Added the missing isDefault field to the Get Dataset Templates API response.
  • Added the missing fileAccessRequest field of terms of use and access to the Get Dataset Templates API response.
  • Added the missing contactForAccess field of terms of use and access to the Get Dataset Templates API response.
  • Resolved an API 500 error that occurred when working with templates containing custom license terms.
  • Updated API behavior so templates are no longer returned from parent dataverses when the "Include Templates from Root" option is unchecked in the UI.

Notifications API fixes

  • Fixed API errors caused by NullPointerException when retrieving notifications without a requestor.

Which issue(s) this PR closes:

Special notes for your reviewer:

Suggestions on how to test this:
I've extended an existing test.

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?:

Additional documentation:

@github-actions github-actions bot added Original size: 0.5 Size: 0.5 A percentage of a sprint. 0.35 hours SPA These changes are required for the Dataverse SPA SPA.Q3.2025.12 Dataset Templates labels Jul 31, 2025
@g-saracca g-saracca moved this to Ready for Review ⏩ in IQSS Dataverse Project Jul 31, 2025
@coveralls
Copy link

coveralls commented Jul 31, 2025

Coverage Status

coverage: 23.556% (+0.1%) from 23.457%
when pulling 541fd21 on 11703-return-isDefault-property-get-dataset-templates
into 338dfa2 on develop.

@github-actions

This comment has been minimized.

@g-saracca g-saracca changed the title 11703 return is default property get dataset templates 11703 return isDefault property get dataset templates Jul 31, 2025
@g-saracca g-saracca moved this from Ready for Review ⏩ to In Progress 💻 in IQSS Dataverse Project Aug 1, 2025
@g-saracca g-saracca self-assigned this Aug 1, 2025
@g-saracca g-saracca moved this from In Progress 💻 to On Hold ⌛ in IQSS Dataverse Project Aug 1, 2025
@g-saracca
Copy link
Contributor Author

g-saracca commented Aug 1, 2025

Moving to On Hold, I found other issues with the API that are beyond my limited knowledge of Java.

  • API throws 500 when adding a custom license/dataset terms from the JSF UI,
    jakarta.ejb.EJBException: Cannot invoke “[edu.harvard.iq](http://edu.harvard.iq/).dataverse.license.License.getId()” because “license” is null
  • API is returning templates from parent dataverses, even if the JSF "Include Templates from Root" checkbox is unchecked.
  • With my changes above the isDefault property is being returned ok when creating a template from the API but it is always being returned as false even if setting it as default from the JSF UI.

@g-saracca g-saracca removed their assignment Aug 1, 2025
@GPortas GPortas moved this from On Hold ⌛ to In Progress 💻 in IQSS Dataverse Project Aug 28, 2025
@GPortas GPortas self-assigned this Aug 28, 2025
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

2 similar comments
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@GPortas GPortas added Size: 20 A percentage of a sprint. 14 hours. Original size: 20 and removed Size: 0.5 A percentage of a sprint. 0.35 hours labels Sep 1, 2025
@g-saracca
Copy link
Contributor Author

Assigning @GPortas since I opened the PR, but he continued with the work.

@g-saracca g-saracca assigned GPortas and unassigned g-saracca Sep 2, 2025
@GPortas GPortas changed the title Templates API fixes Templates and Notifications API fixes Sep 3, 2025
@github-actions

This comment has been minimized.

2 similar comments
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@GPortas
Copy link
Contributor

GPortas commented Sep 3, 2025

@sekmiller

Thanks. I fixed the CreateTemplateCommand to persist the default template in the Dataverse entity.

I also added a minor fix to the notifications API (not related to the original PR scope).

@GPortas GPortas removed their assignment Sep 3, 2025
@GPortas GPortas requested a review from sekmiller September 3, 2025 11:39
@github-actions
Copy link

github-actions bot commented Sep 3, 2025

📦 Pushed preview images as

ghcr.io/gdcc/dataverse:11703-return-isDefault-property-get-dataset-templates
ghcr.io/gdcc/configbaker:11703-return-isDefault-property-get-dataset-templates

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

Copy link
Contributor

@sekmiller sekmiller left a comment

Choose a reason for hiding this comment

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

Looks good. Thanks for the changes/updates. As I mentioned in Stand up, my local test is failing because I have a template in Root, but this should pass with a newly created DB.

@github-project-automation github-project-automation bot moved this from In Review 🔎 to Ready for QA ⏩ in IQSS Dataverse Project Sep 3, 2025
@sekmiller sekmiller removed their assignment Sep 3, 2025
@ofahimIQSS ofahimIQSS self-assigned this Sep 4, 2025
@ofahimIQSS ofahimIQSS moved this from Ready for QA ⏩ to QA ✅ in IQSS Dataverse Project Sep 4, 2025
@ofahimIQSS
Copy link
Contributor

Hello! I tested this PR with the dataverseadmin account on internal environment.
curl -H "X-Dataverse-key:$API_TOKEN" "$SERVER_URL/api/notifications/all?inAppNotificationFormat=true"

--- This worked

curl -H "X-Dataverse-key:$API_TOKEN" "$SERVER_URL/api/notifications/all" --- when running this, i got empty flower brackets {}

See log files. The Testing file shows the curl commands I ran along with the second file which is the server logs.
Notifications API Testing.log
NotificationsAPI-server.log

@ofahimIQSS
Copy link
Contributor

#11683 --- existing Notifications API issue

@ofahimIQSS ofahimIQSS merged commit 44847ec into develop Sep 5, 2025
22 checks passed
@github-project-automation github-project-automation bot moved this from QA ✅ to Merged 🚀 in IQSS Dataverse Project Sep 5, 2025
@ofahimIQSS ofahimIQSS deleted the 11703-return-isDefault-property-get-dataset-templates branch September 5, 2025 01:26
@ofahimIQSS ofahimIQSS removed their assignment Sep 5, 2025
@pdurbin pdurbin added this to the 6.8 milestone Sep 5, 2025
@scolapasta scolapasta moved this from Merged 🚀 to Done 🧹 in IQSS Dataverse Project Sep 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Original size: 10 Size: 3 A percentage of a sprint. 2.1 hours. SPA.Q3.2025.12 Dataset Templates SPA These changes are required for the Dataverse SPA Type: Bug a defect

Projects

Status: Done 🧹

Development

Successfully merging this pull request may close these issues.

Return isDefault property in Get Dataset Templates endpoint

7 participants