FAT-27027: Confirm mediated request#2491
Open
OleksandrVidinieiev wants to merge 10 commits into
Open
Conversation
…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>
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.
Purpose
https://folio-org.atlassian.net/browse/FAT-27027
Approach
How does this change fulfill the purpose?
TODOS and Open Questions
Learning
Describe the research stage. Add links to blog posts, patterns, libraries or addons used to solve this problem.