support read/unread status for notifications#11664
Merged
ofahimIQSS merged 4 commits intodevelopfrom Jul 24, 2025
Merged
Conversation
- displayAsRead boolean added to "get all" - new GET unreadCount API endpoint - new PUT markAsRead API endpoint
This comment has been minimized.
This comment has been minimized.
1 similar comment
This comment has been minimized.
This comment has been minimized.
sekmiller
reviewed
Jul 22, 2025
sekmiller
approved these changes
Jul 22, 2025
Contributor
sekmiller
left a comment
There was a problem hiding this comment.
Looks good. Thanks for the quick fix on the doc
|
📦 Pushed preview images as 🚢 See on GHCR. Use by referencing with full name as printed above, mind the registry name. |
Contributor
|
EDIT: was able to reproduce issue on the develop branch - created a separate issue to track this: #11683 |
Contributor
|
Testing Passed - Merging. 11 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this PR does / why we need it:
Which issue(s) this PR closes:
Special notes for your reviewer:
NotificationsIT points out two APIs that don't generate notifications at all:
They probably should! And there are probably others. I opened this issue a while ago (10+ years!) about this:
As I mentioned in Slack, we could maybe go with just "read", "unread" (what GitHub uses), or "hasBeenRead" instead of "displayAsRead" (which comes from a transient variable used by JSF).
Existing methods in Notifications.java use a funny pattern to get an authenticated user. Methods I added use our standard getRequestAuthenticatedUserOrDie.
@ekraffmiller mentioned that #11648 is related and I plan to take a look, at least. I think a fix might be better as a follow up pull request. Update: a draft, for now:
Here are some related GitHub APIs I looked at:
They obviously store timestamps for when notifications were read but we only store booleans.
Suggestions on how to test this:
Try the endpoints mentioned in the docs for this PR.
Automated tests are also included. Make sure they are passing.
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, included.
Additional documentation:
Preview at https://dataverse-guide--11664.org.readthedocs.build/en/11664/api/native-api.html#notifications