Skip to content

Conversation

@vera
Copy link
Contributor

@vera vera commented Feb 6, 2026

What this PR does / why we need it:

While using the notifications API with inAppNotificationFormat=true, I saw a lot of notifications about supposedly deleted datasets being submitted for review:

image

However, I knew these datasets weren't actually deleted. After looking at the relevant Dataverse code, I believe I found a bug in InAppNotificationsJsonPrinter.

It tries to use the notification's objectId to look up the relevant dataset by ID, however, the notification's objectId is not a dataset ID. It's a dataset version ID:

ctxt.notifications().sendNotification(au, new Timestamp(new Date().getTime()), UserNotification.Type.SUBMITTEDDS, savedDataset.getLatestVersion().getId(), "", requestor, false);

I've changed the code to correctly use the objectId to look up a dataset version by ID.

Special notes for your reviewer:

/

Suggestions on how to test this:

I believe this bug might not always show up, for example in simple test cases which only create a single dataset with a single version, because in that case, it's possible that the dataset version ID and dataset ID are in sync. I've therefore slightly extended the InReviewWorkflowIT test case to create a second dataset version to try and force the bug to show up.

In my tests, it's worked. Without the fix, the test failed:

[INFO] Results:
[INFO] 
[ERROR] Failures: 
[ERROR]   InReviewWorkflowIT.testCuratorSendsCommentsToAuthor:459 1 expectation failed.
JSON path data[0].datasetPersistentIdentifier doesn't match.    

With the fix, the test succeeded.

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

I'm not sure this is a highly relevant bug, so maybe not.

Additional documentation:

/

@pdurbin pdurbin moved this to Ready for Triage in IQSS Dataverse Project Feb 10, 2026
@scolapasta scolapasta moved this from Ready for Triage to Ready for Review ⏩ in IQSS Dataverse Project Feb 10, 2026
@cmbz cmbz added FY26 Sprint 16 FY26 Sprint 16 (2026-01-28 - 2026-02-11) FY26 Sprint 17 FY26 Sprint 17 (2026-02-11 - 2026-02-25) labels Feb 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

FY26 Sprint 16 FY26 Sprint 16 (2026-01-28 - 2026-02-11) FY26 Sprint 17 FY26 Sprint 17 (2026-02-11 - 2026-02-25)

Projects

Status: Ready for Review ⏩

Development

Successfully merging this pull request may close these issues.

2 participants