Skip to content

Commit

Permalink
Merge pull request #42 from indexdata/PR-2026-D
Browse files Browse the repository at this point in the history
Pr 2026 d
  • Loading branch information
JanisSaldabols authored Nov 12, 2024
2 parents da698c4 + c759a42 commit 0e53ef9
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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:
Expand Down
1 change: 0 additions & 1 deletion src/main/java/org/folio/ncip/Constants.java
Original file line number Diff line number Diff line change
Expand Up @@ -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";

}
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
1 change: 1 addition & 0 deletions src/main/resources/ncip.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 0e53ef9

Please sign in to comment.