Skip to content

FAT-27027: Confirm mediated request#2491

Open
OleksandrVidinieiev wants to merge 10 commits into
masterfrom
FAT-27027
Open

FAT-27027: Confirm mediated request#2491
OleksandrVidinieiev wants to merge 10 commits into
masterfrom
FAT-27027

Conversation

@OleksandrVidinieiev

Copy link
Copy Markdown
Contributor

Purpose

https://folio-org.atlassian.net/browse/FAT-27027

Approach

How does this change fulfill the purpose?

TODOS and Open Questions

  • Use GitHub checklists. When solved, check the box and explain the answer.

Learning

Describe the research stage. Add links to blog posts, patterns, libraries or addons used to solve this problem.

OleksandrVidinieiev and others added 8 commits July 9, 2026 14:49
…s test

- Add Step 6 in mediated-requests-consortium-setup: create inventory data
  for the college tenant (institution, campus, library, service points,
  instance types, loan types, material types, holdings source, location)
- Create mrCentralServicePointId (pickup service point) in college tenant
  so requests with that pickupServicePointId are valid across all tenants
- Add college shadow admin permissions for mediated-request operations
- Add college tenant circulation policies
- CreatePatronUser now also creates the patron group in the college tenant
- Add confirm scenario and multi-tenant request verification

The mrCentralServicePointId pickup service point was already created in the
university tenant; the root cause of the failure was missing college tenant
inventory data that caused createInventoryInCollege to fail.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…rm flow

When a mediated request is confirmed, mod-requests-mediated creates the ECS
TLR with pickupServicePointId hardcoded to INTERIM_SERVICE_POINT_ID
(32c6f0c7-26e4-4350-8c29-1e11c2e3efc4). mod-tlr's createSecondaryRequest and
createIntermediateRequest look up this service point in the primary (university)
tenant and clone it into the lending/intermediate tenants. Because the interim
service point did not exist in the university tenant, the lookup returned null
and CloningServiceImpl.clone threw a NullPointerException, failing the confirm
scenario.

Create the interim service point in the university (secure) tenant during setup
so the pickup service point can be resolved and cloned.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@CreatePatronUser now also creates the patron group in the central tenant,
using the new centralOkapitoken/centralTenant parameters, matching the
existing university and college group creation. Updated call sites in
mediated-requests.feature to pass the central tenant credentials.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…diated request

After confirming the mediated request, verify:
- item-storage/items/{id} in college tenant (where the item physically resides) has status.name == 'Paged'
- circulation-item/{itemId} in university tenant has status.name == 'Paged'
- circulation-item/{itemId} in central tenant has status.name == 'Paged'

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add vega/util/mediated-requests-fetch-util.feature with three reusable
named scenarios:
  - @FetchRequestStorageRequest: GET request-storage/requests/{id} in a tenant
  - @FetchInventoryItem: GET item-storage/items/{id} in a tenant
  - @FetchCirculationItem: GET circulation-item/{id} in a tenant

Replace the inline duplicated GET+match blocks in mediated-requests.feature
with calls to these helpers, reducing duplication across the multi-tenant
verification steps in the confirm scenario.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Karate shares the calling scenario's variable/config scope (including
'configure headers') with called features. Simplify the fetch helpers
in mediated-requests-fetch-util.feature to rely on the caller having
already set the desired tenant headers via 'configure headers = ...',
instead of threading okapitoken/tenant through as explicit call args.
Only the varying identifier (requestId/itemId) needs to be passed.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant