Skip to content

Comments

Implements pagination and unread-only filter options to notifications/all endpoint#11854

Merged
sekmiller merged 201 commits into11804-notifs-api-extfrom
11852-notifs-api-pagination-unread
Nov 24, 2025
Merged

Implements pagination and unread-only filter options to notifications/all endpoint#11854
sekmiller merged 201 commits into11804-notifs-api-extfrom
11852-notifs-api-pagination-unread

Conversation

@GPortas
Copy link
Contributor

@GPortas GPortas commented Sep 30, 2025

What this PR does / why we need it:

Review #11851 first.

The user notifications endpoint has been enhanced with new optional query parameters to allow for more specific and
efficient data retrieval.

1. Filter by Unread Status

You can now fetch only unread notifications by using the onlyUnread boolean parameter.

  • onlyUnread: (Optional, boolean) When set to true, the API will only return notifications that the user has not
    yet marked as read.

Example:

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

2. Pagination Support

Pagination is now supported through the limit and offset parameters, allowing you to retrieve notifications in smaller,
manageable chunks.

  • limit: (Optional, integer) Specifies the maximum number of notifications to return.

  • offset: (Optional, integer) Specifies the number of notifications to skip before starting to return results.

Example (Retrieve notifications 11 through 20):

curl -H "X-Dataverse-key:$API_TOKEN" "$SERVER_URL/api/notifications/all?limit=10&offset=10"

Which issue(s) this PR closes:

Suggestions on how to test this:

Described above

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

None

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

Yes, attached

ofahimIQSS and others added 30 commits July 31, 2025 14:08
when cutting a release, base.image.version needs to be "revision" #11700
…11639

Implemented a method to parse strings into `SettingsServiceBean.Key` values, handling null and invalid inputs gracefully. Added corresponding unit tests to verify behavior and maintain consistency.
…hout language data #11639

Replaced usage of `listAll` with the new `listAllWithoutLocalizations` method in various parts of the codebase for improved clarity and targeted queries. Added the corresponding named query `Setting.findAllWithoutLang`.

Before, listAll was used in context without localization present or dropping the l10n details from outputs.
For example, the Admin API to get all settings neglected to share the localized information, making one setting appear multiple times without the l10n information present.

This is still subject to change, enabling the API endpoints to keep this information around.
…ion support #11639

Replaced `listAllWithoutLocalizations` in the Admin API with the new `listAllAsJson` method, enabling inclusion of localized setting variants in API responses. Added OpenAPI annotations for improved documentation. Introduced comprehensive unit tests to validate behavior of localized and non-localized settings handling.
This is because Intellij IDEA's MavenJUnitPatcher only correctly uses the maven-surefire-plugin <argLine> if all interpolated properties are present.

If a single property is missing, the <argLine> will not be used by IntelliJ's test runner, which is horrible to debug.

See also https://github.com/kreiger/idea-maven-test-profiles-argline


Introduced new methods in `SystemConfig` to support tabular ingest size limits as JSON objects or single values. This replaces the old way of using colon-separated format suffixes with the setting name.

Enhanced flexibility with format-specific or universal defaults. Updated `EditDatafilesPage` to populate human-readable format-specific limits. Added comprehensive unit tests to validate behavior, including edge cases for invalid configurations.
… Flyway #11639

Implemented migration script to replace old format-specific TabularIngestSizeLimit settings with a unified JSON-based structure. Validates and handles non-numeric values, ensures backward compatibility, and cleans up obsolete settings.
… and defaults #11639

Refined the explanation of tabular ingest size limits, introduced examples for JSON configuration, clarified default behavior, and updated guidance on per-format overrides.
…11639

Updated warnings and validation logic to enforce string literals for size limits.
Added a new test to ensure proper handling of JSON configurations with unsupported integer types for tabular ingest size limits.
Improved related documentation for clarity.
#11639

Streamlined the logic of `listAllAsJson` to use a flattened structure for localized settings, improving maintainability and backward compatibility. Updated test assertions in `SettingsServiceBeanTest` to reflect the new structure. Added enhanced method documentation.
…ettings API #11639

Introduced validation logic for setting names and ISO 639-1 language codes across Admin API endpoints. Ensures meaningful error messages for invalid inputs, improving robustness and user feedback. Refactored related methods accordingly. Added missing GET endpoint for localized settings.
…ate tests #11639

Enhanced `listAllAsJson` to handle settings with JSON content as proper JSON objects in the API response. Introduced a constant for localization key separator. Updated unit tests to cover new behavior with JSON settings.
… codes in `SettingsServiceBean` #11639

Moved `validateSettingName` and `validateSettingLang` from `Admin` to `SettingsServiceBean` to improve reusability and maintain consistency. Updated tests and API endpoints to use the centralized methods. Expanded test coverage for validation scenarios.
…tests #11639

Introduced `validateKeys` method in `SettingsServiceBean` to ensure proper settings key validation, including localized and non-localized cases. Added parameterized test coverage for validation scenarios in `SettingsServiceBeanTest`.
…it tests #11639

Introduced `convertJsonToSettings` in `SettingsServiceBean` to transform JSON objects into `Setting` instances, supporting language-specific keys. Added comprehensive unit tests to verify functionality with various JSON structures.
…date #11639

Introduced a new `PUT /api/admin/settings` endpoint to update all settings in bulk with JSON input. Added `setAllFromJson` method and placeholder implementation for `replaceAllSettings` in `SettingsServiceBean`. Validates input structure and ensures atomic updates.
…s default for `lang` #11639

Replaced `NULL` with empty string for `lang` field in `Setting` entity to align with SQL standards and ensure unique constraint behavior. Updated queries, methods, and added safeguards to handle empty `lang` consistently. Enhanced documentation for clarity.
… for `name` in `Setting` entity #11639

Updated `name` field to enforce a maximum length of 200 characters on a VARCHAR field for better performance (replacing the TEXT column type) and mark it as non-nullable (null settings make no sense at all). Added `Objects.requireNonNull` validation for `name` in entity methods and constructors to ensure consistent behavior.
Introduced SQL migration to optimize `Setting` table by switching `TEXT` columns to `VARCHAR` for better performance, enforcing `NOT NULL` constraints, adding a unique constraint for `name` and `lang`, and setting default empty string for `lang`. Includes logic to handle existing data and conditional checks for schema changes.
…ty and robustness #11639

Refined `equals` and `hashCode` methods to base equality comparison on `name` and `lang` fields, improving consistency and alignment with usage patterns. Updated the no-argument constructor to protected, adding explanatory comments for enforced design intent and JPA compatibility.
… alignment and consistency #11639

Updated references, documentation, and added migration script to reflect the renaming and ensure adherence to naming conventions. Marked the setting as deprecated for removal.
…for reusability #11639

Moved logic for constructing JSON keys into a dedicated method `convertToJsonKey`, improving code clarity and reducing duplication.
sekmiller and others added 9 commits November 13, 2025 10:38
…ter migrations #11654

Introduced a Flyway callback to clean up entries in the `setting` table with unknown keys post-migration. Updated `StartupFlywayMigrator` to register this callback.
Bumps [appleboy/ssh-action](https://github.com/appleboy/ssh-action) from 1.2.2 to 1.2.3.
- [Release notes](https://github.com/appleboy/ssh-action/releases)
- [Changelog](https://github.com/appleboy/ssh-action/blob/master/.goreleaser.yaml)
- [Commits](appleboy/ssh-action@v1.2.2...v1.2.3)

---
updated-dependencies:
- dependency-name: appleboy/ssh-action
  dependency-version: 1.2.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Steven Winship <39765413+stevenwinship@users.noreply.github.com>
doc update sphinx 7.2.6 -> 7.4.0
@sekmiller sekmiller self-assigned this Nov 20, 2025
@sekmiller sekmiller moved this from Ready for QA ⏩ to QA ✅ in IQSS Dataverse Project Nov 20, 2025
sekmiller and others added 6 commits November 20, 2025 10:52
Database Settings: idempotent mass operations, necessary cleanup and script using it for real use case
…icted-draft

show draft/unpublished in UI
refactor UpdateDatasetLicenseCommand  to extend AbstractDatasetCommand<Dataset>
sekmiller and others added 2 commits November 20, 2025 13:45
* 11744: CORS: echo request Origin and add Vary: Origin; sanitize CSV lists; prefer comma-separated origins; rely on JVM options/MicroProfile only; add tests and release notes

* Centralize CSV parsing (CsvUtil) + CORS origin echo & Vary header improvements

* Make CORS origin list optional in CorsFilter initialization

* Refactor GlobusOverlayAccessIO and CsvUtil for improved endpoint handling and CSV parsing

* updated release note and comments

* test fixes

* Clarify CORS requirements for browser-based external tools in documentation

* Update CORS documentation to clarify configuration requirements and deprecate legacy settings

* Remove unused CSV lookup methods

* Update JvmSettings documentation to clarify CSV list return types

* Refactor doc structure for improved readability and maintainability

* wording

* Removed deprecated (and removed from code) AllowCors setting from doc

* Fix formatting inconsistencies in dataset management documentation

* rename: CsvUtil -> ListSplitUtil

* Refactor CSV list lookup methods to join array elements before splitting

* Rename CSV list lookup methods to use 'lookupSplittedList' for consistency

* revert whitespace changes done by automated formatting tool

* revert whitespace-only changes done by automatic tool

* code cleanup

* code cleanup

* revert whitespace changes done by automated formatting tool

* revert whitespace changes done by automated formatting tool

* revert whitespace changes done by automated formatting tool

* revert whitespace changes done by automated formatting tool

* remove legacy dependency on SettingsServiceBean in CorsFilterTest

* refactor: replace Arrays.stream with ListSplitUtil.split in CorsFilter

* refactor: replace ListSplitUtil.split with Arrays.stream for list processing in JvmSettings

* Enhance JvmSettings: Add trimming options for lookupSplittedList methods to handle whitespace in tokenized values

---------

Co-authored-by: Steven Winship <39765413+stevenwinship@users.noreply.github.com>
@cmbz cmbz added the FY26 Sprint 11 FY26 Sprint 11 (2025-11-20 - 2025-12-03) label Nov 22, 2025
@github-actions
Copy link

📦 Pushed preview images as

ghcr.io/gdcc/dataverse:11852-notifs-api-pagination-unread
ghcr.io/gdcc/configbaker:11852-notifs-api-pagination-unread

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

@sekmiller sekmiller merged commit 0a77100 into 11804-notifs-api-ext Nov 24, 2025
17 of 18 checks passed
@github-project-automation github-project-automation bot moved this from QA ✅ to Merged 🚀 in IQSS Dataverse Project Nov 24, 2025
@sekmiller sekmiller deleted the 11852-notifs-api-pagination-unread branch November 24, 2025 19:55
@pdurbin pdurbin moved this from Merged 🚀 to Done 🧹 in IQSS Dataverse Project Nov 25, 2025
@pdurbin pdurbin added this to the 6.9 milestone Nov 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

FY26 Sprint 8 FY26 Sprint 8 (2025-10-08 - 2025-10-22) FY26 Sprint 9 FY26 Sprint 9 (2025-10-22 - 2025-11-05) FY26 Sprint 10 FY26 Sprint 10 (2025-11-05 - 2025-11-19) FY26 Sprint 11 FY26 Sprint 11 (2025-11-20 - 2025-12-03) GREI Re-arch Issues related to the GREI Dataverse rearchitecture Original size: 3 Size: 3 A percentage of a sprint. 2.1 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.