diff --git a/README.md b/README.md index fa07deb..be44c94 100644 --- a/README.md +++ b/README.md @@ -49,6 +49,7 @@ NISO Circulation Interchange Protocol (NCIP) support in FOLIO * (20) item.soft.delete DeleteItem will use soft delete or delete entities. Default value `true` * (21) request.fulfillment_preference ILS request fulfillment preference when RequestItem. Default value `Hold Shelf` * (22) request.accept.fulfillment_preference ILS request fulfillment preference when AcceptItem. Default value `Hold Shelf` + * (23) checkout.loan.info.type In checkout process if note is enabled then use this type to add info. Default value `patronInfoAdded` other possible value `staffInfoAdded` Notes * You can assign different values to these settings per Agency ID used in the NCIP requests. This approach lets you setup different values for different Agency IDs. For example, if Relais calls your NCIP server with the Agency ID of 'Relais' you can configure values for that agency. If ReShare calls your NCIP server using a different Agency ID, you can set up different configuration values to be used for ReShare requests. These settings have to exist for each Agency ID that will be used in the NCIP requests. @@ -164,6 +165,7 @@ There are three types of settings that can exist in mod-configuration for the NC | NCIP | Relais | user.email.type | mailto | | NCIP | Relais | request.fulfillment_preference | Hold Shelf | | NCIP | Relais | request.accept.fulfillment_preference | Hold Shelf | +| NCIP | Relais | checkout.loan.info.type | patronInfoAdded | You will need a set of these settings in mod-configuration for each individual Agency ID making NCIP requests. Example of an AgencyID in an NCIP request: diff --git a/src/main/java/org/folio/ncip/Constants.java b/src/main/java/org/folio/ncip/Constants.java index f324a77..68f982b 100644 --- a/src/main/java/org/folio/ncip/Constants.java +++ b/src/main/java/org/folio/ncip/Constants.java @@ -119,7 +119,6 @@ public class Constants { public static final String NOTE_DOMAIN_REQUESTS = "requests"; public static final String NOTE_TITLE_TEMPLATE = "ILL Request id: %s"; public static final String NOTE_LINK_TYPE_REQUEST = "request"; - public static final String STAFF_INFO_TYPE = "staffInfoAdded"; public static final String ITEM_STATUS_UNAVAILABLE = "Unavailable"; } diff --git a/src/main/java/org/folio/ncip/FolioRemoteServiceManager.java b/src/main/java/org/folio/ncip/FolioRemoteServiceManager.java index b5bd9e8..abeff35 100644 --- a/src/main/java/org/folio/ncip/FolioRemoteServiceManager.java +++ b/src/main/java/org/folio/ncip/FolioRemoteServiceManager.java @@ -451,7 +451,7 @@ private void addStaffInfoIfNeeded(String agencyId, RequestId requestId, String l if (Constants.BOOLEAN_TRUE.equalsIgnoreCase(noteEnabled) && requestId != null && requestId.getRequestIdentifierValue() != null) { JsonObject staffInfo = new JsonObject(); - staffInfo.put("action", Constants.STAFF_INFO_TYPE); + staffInfo.put("action", ncipProperties.getProperty(agencyId + ".checkout.loan.info.type")); staffInfo.put("actionComment", String.format(Constants.NOTE_TITLE_TEMPLATE, requestId.getRequestIdentifierValue())); try { callApiPost(baseUrl + String.format(Constants.ADD_STAFF_INFO_URL, loanUuid), staffInfo); diff --git a/src/main/resources/ncip.properties b/src/main/resources/ncip.properties index 0098b05..55c5298 100644 --- a/src/main/resources/ncip.properties +++ b/src/main/resources/ncip.properties @@ -25,3 +25,4 @@ request.note.enabled=false item.soft.delete=true request.fulfillment_preference=Hold Shelf request.accept.fulfillment_preference=Hold Shelf +checkout.loan.info.type=patronInfoAdded