Skip to content

feat(packages): show managed and custom subjects in package record - #723

Merged
viacheslavkol merged 6 commits into
masterfrom
MODKBEKBJ-853
Oct 15, 2026
Merged

viacheslavkol merged 6 commits into
masterfrom
MODKBEKBJ-853

Conversation

@viacheslavkol

@viacheslavkol viacheslavkol commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

Purpose

The package detail record in eHoldings has to show the package's managed and custom subjects. HoldingsIQ already returns them as subjectAssociations, but mod-kb-ebsco-java didn't pass them through to the UI.

Approach

  • Added a new packageSubject.json schema with these fields: id, name and isCustom.
  • Added a read-only subjects array to packageDataAttributes.json.
  • Package record (PackageConverter, used by GET/PUT /eholdings/packages/{packageId} and POST /eholdings/packages) maps subjectAssociations to subjects with filtering:
    • Managed subjects are always included. This also applies when isCustom is null.
    • Custom subjects are included only when explicitAssignment is true. Custom hierarchy placeholders without an explicit assignment are dropped.
    • If subjectAssociations is missing, subjects is null.
  • Package list responses (PackageCollectionItemConverter, e.g. GET /eholdings/packages, provider packages) don't include subjects. HoldingsIQ list responses don't provide explicitAssignment, so custom placeholders can't be told apart there.

Changes Checklist

  • API Changes: The single package response gets a new read-only attributes.subjects array (id, name, isCustom), which is additive. The new schema is ramls/types/packages/packageSubject.json. The package by-id RAML example includes subjects.
  • Database Schema Changes: None.
  • Interface Version Changes: None. The change is additive and covered by the unreleased eholdings 5.0.
  • Interface Dependencies: No new interface dependencies. Needs folio-holdingsiq-client 6.0.0-SNAPSHOT (FHIQC-60).
  • Permissions: None.
  • Logging: No logging changes needed.
  • Unit Testing: PackageConverterTest covers the record filtering and field mapping (managed vs. custom, isCustom=null, missing subjectAssociations).
  • Integration Testing: The package by-id HoldingsIQ stub follows the real by-id field set and includes a custom placeholder that must be excluded. Package list tests verify that subjects isn't returned. EholdingsPackagesIntegrationTest, EholdingsProvidersImplIntegrationTest and EholdingsResourcesImplIntegrationTest pass.
  • Manual Testing: Checked against real HoldingsIQ data.
  • NEWS: Added a Features entry.

Related Issues

Map HoldingsIQ subjectAssociations to a new read-only subjects array
on package data attributes. Managed subjects are always included;
custom subjects are included only when explicitly assigned.

Refs: MODKBEKBJ-853
Add a managed subject to the package by-id RM API stub and expected
responses, and to the RAML package example.

Refs: MODKBEKBJ-853
@viacheslavkol viacheslavkol self-assigned this Oct 13, 2026
Use the by-id subjectAssociations field set (subjectHierarchy,
explicitAssignment) in the package by-id stub and add a custom
non-explicit subject that must be excluded. Add subjects to the
package list RAML example.

Refs: MODKBEKBJ-853
HoldingsIQ package list responses do not include explicitAssignment,
so filtering there dropped every custom subject. Return all subjects
in package lists and keep the custom placeholder filter for the
package record.

Refs: MODKBEKBJ-853
Remove subjects from package list responses and keep them on the
package record only.

Refs: MODKBEKBJ-853
@sonarqubecloud

Copy link
Copy Markdown

@viacheslavkol
viacheslavkol marked this pull request as ready for review October 15, 2026 10:49
@viacheslavkol
viacheslavkol requested a review from a team as a code owner October 15, 2026 10:49
@viacheslavkol
viacheslavkol merged commit 9f35478 into master Oct 15, 2026
20 checks passed
@viacheslavkol
viacheslavkol deleted the MODKBEKBJ-853 branch October 15, 2026 13:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants