diff --git a/ramls/holdings_update_ownership.json b/ramls/holdings_update_ownership.json index e185dcfbc..fb3e9e47f 100644 --- a/ramls/holdings_update_ownership.json +++ b/ramls/holdings_update_ownership.json @@ -14,6 +14,10 @@ "$ref": "uuid.json" } }, + "targetLocationId": { + "description": "Id of the location at the target tenant where Holdings will be created.", + "$ref": "uuid.json" + }, "targetTenantId": { "description": "Target tenant Id, where selected Holdings will be created.", "type": "string" diff --git a/src/main/java/org/folio/inventory/resources/UpdateOwnershipApi.java b/src/main/java/org/folio/inventory/resources/UpdateOwnershipApi.java index 0852b3d23..7d41dc5d0 100644 --- a/src/main/java/org/folio/inventory/resources/UpdateOwnershipApi.java +++ b/src/main/java/org/folio/inventory/resources/UpdateOwnershipApi.java @@ -276,7 +276,7 @@ private CompletableFuture> updateOwnershipOfHoldingsRecords(Holding if (!jsons.isEmpty()) { List validatedHoldingsRecords = validateHoldingsRecords(jsons, holdingsUpdateOwnership.getToInstanceId(), notUpdatedEntities); List holdingsRecordWrappers = - validatedHoldingsRecords.stream().map(this::mapHoldingsRecordWrapper).toList(); + validatedHoldingsRecords.stream().map(h -> mapHoldingsRecordWrapper(h, holdingsUpdateOwnership)).toList(); return validateHoldingsRecordsBoundWith(holdingsRecordWrappers, notUpdatedEntities, routingContext, context) .thenCompose(wrappersWithoutBoundWith -> createHoldings(wrappersWithoutBoundWith, notUpdatedEntities, targetTenantHoldingsRecordCollection)) @@ -571,10 +571,13 @@ private String getTargetHoldingId(JsonObject itemJson, List