diff --git a/Dockerfile b/Dockerfile index b97bdb6..758ad41 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM folioci/alpine-jre-openjdk17:latest +FROM folioci/alpine-jre-openjdk21:latest # Install latest patch versions of packages: https://pythonspeed.com/articles/security-updates-in-docker/ USER root diff --git a/Jenkinsfile b/Jenkinsfile index c986414..89833f5 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,7 +1,7 @@ buildMvn { publishModDescriptor = true mvnDeploy = true - buildNode = 'jenkins-agent-java17' + buildNode = 'jenkins-agent-java21' doDocker = { buildJavaDocker { diff --git a/NEWS.md b/NEWS.md index 019cf10..de01d1d 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,12 @@ +## 1.16.1 2025-09-25 +* [MODNCIP-90](https://folio-org.atlassian.net/browse/MODNCIP-90) RequestItem service - make hrid optional (Sunflower) + +## 1.16.0 2025-09-25 +* Copy of 1.15.7 - version correction for Sunflower + +## 1.15.7 2025-03-12 +* [FOLREL-651](https://folio-org.atlassian.net/browse/FOLREL-651) Update to Java 21 + ## 1.15.6 2024-11-21 * Fix missing permission issue * Use item call number from AcceptItem request if it is provided diff --git a/pom.xml b/pom.xml index 5e021a1..b0f07e1 100644 --- a/pom.xml +++ b/pom.xml @@ -3,7 +3,7 @@ 4.0.0 org.folio mod-ncip - 1.15.7-SNAPSHOT + 1.17.0-SNAPSHOT NCIP NCIP responder for FOLIO (internal module) @@ -18,7 +18,7 @@ 4.5.10 UTF-8 UTF-8 - 17 + 21 4.1.0 diff --git a/src/main/java/org/folio/ncip/FolioRemoteServiceManager.java b/src/main/java/org/folio/ncip/FolioRemoteServiceManager.java index f7cd202..3d95a80 100644 --- a/src/main/java/org/folio/ncip/FolioRemoteServiceManager.java +++ b/src/main/java/org/folio/ncip/FolioRemoteServiceManager.java @@ -724,6 +724,20 @@ public JsonObject requestItem(RequestItemInitiationData initData) throws Excepti String searchUrl = baseUrl + (titleRequest ? Constants.INSTANCE_SEARCH_URL : Constants.ITEM_SEARCH_URL) .replace("$hrid$", hrid); + + // This allows the place request service to work with only the barcode in the request. This is a fallback when hrid is missing. + if ((hrid == null || hrid.isEmpty()) && !titleRequest) { + if (initData != null && initData.getRequestId() != null) { + String barcode = initData.getRequestId().getRequestIdentifierValue(); + if (barcode != null && !barcode.isEmpty()) { + searchUrl = baseUrl + (Constants.ITEM_SEARCH_BY_BARCODE_URL) + .replace("$barcode$", barcode); + logger.info("using barcode"); + logger.info(searchUrl); + } + } + } + String responseString = callApiGet(searchUrl); JsonObject response = new JsonObject(responseString);