Skip to content

Conversation

@GPortas
Copy link
Contributor

@GPortas GPortas commented Jul 30, 2025

What this PR does / why we need it:

Includes the following changes:

getAllNotificationsForUser API extension

  • Extended endpoint getAllNotificationsForUser(/notifications/all), which now supports an optional query parameter inAppNotificationFormat which, if sent as true, retrieves the fields needed to build the in-app notifications for the Notifications section of the Dataverse UI, omitting fields related to email notifications.

Notifications triggered by API endpoints

The addDataset and addDataverse API endpoints now trigger user notifications upon successful execution.

Related issue: #1342

Which issue(s) this PR closes:

Special notes for your reviewer:

The new fields returned by the new inAppNotificationFormat flag are based on the fields required by JSF to compose the notifications on the user page.

Suggestions on how to test this:

  1. Creating an account, dataverses, and datasets—these operations should generate notifications that you can then query using the API endpoint.

  2. Test calling the endpoint with the new query parameter and without it, to see the differencies.

Retrieving notifications for In-App:

curl -H "X-Dataverse-key:$API_TOKEN" "$SERVER_URL/api/notifications/all?inAppNotificationFormat=true"

Retrieving notifications as before:

curl -H "X-Dataverse-key:$API_TOKEN" "$SERVER_URL/api/notifications/all"

❗❗

For dataset creation to trigger a notification, the SendNotificationOnDatasetCreation setting must first be enabled (set to true). This behavior already existed in Dataverse, but previously only curators would receive a notification when the setting was true. Now, the author also receives a notification if the setting is true and the dataset is created through the API.

I am open to removing the setting to avoid requiring an additional step of enabling it in installations that use the SPA. However, I have decided to keep it for backward compatibility.

❗❗

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

No

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

Yes, find attached

Additional documentation:

Preview at https://dataverse-guide--11696.org.readthedocs.build/en/11696/api/native-api.html#get-all-notifications-by-user

@coveralls
Copy link

coveralls commented Jul 30, 2025

Coverage Status

coverage: 23.312% (+0.1%) from 23.199%
when pulling 877e428 on 11648-notifications-api-extension
into 8592e63 on develop.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

1 similar comment
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

3 similar comments
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

1 similar comment
@github-actions

This comment has been minimized.

@GPortas GPortas removed their assignment Aug 14, 2025
@github-actions

This comment has been minimized.

3 similar comments
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

1 similar comment
@github-actions

This comment has been minimized.

@github-actions
Copy link

📦 Pushed preview images as

ghcr.io/gdcc/dataverse:11648-notifications-api-extension
ghcr.io/gdcc/configbaker:11648-notifications-api-extension

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

Copy link
Member

@pdurbin pdurbin left a comment

Choose a reason for hiding this comment

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

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

Looks good to me, merging.

@ofahimIQSS ofahimIQSS merged commit 7be6af8 into develop Aug 18, 2025
23 checks passed
@github-project-automation github-project-automation bot moved this from QA ✅ to Merged 🚀 in IQSS Dataverse Project Aug 18, 2025
@ofahimIQSS ofahimIQSS deleted the 11648-notifications-api-extension branch August 18, 2025 16:58
@ofahimIQSS ofahimIQSS removed their assignment Aug 18, 2025
@pdurbin pdurbin added this to the 6.8 milestone Aug 18, 2025
@scolapasta scolapasta moved this from Merged 🚀 to Done 🧹 in IQSS Dataverse Project Aug 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

FY26 Sprint 3 (2025-07-30 - 2025-08-13) FY26 Sprint 4 FY26 Sprint 4 (2025-08-13 - 2025-08-27) GREI Re-arch Issues related to the GREI Dataverse rearchitecture Original size: 10 Size: 10 A percentage of a sprint. 7 hours. SPA.Q3.2025.6 Account: Notifications SPA These changes are required for the Dataverse SPA

Projects

Status: Done 🧹

Development

Successfully merging this pull request may close these issues.

Notifications API: remove hard-coded dataset urls from message text

7 participants