Skip to content

Commit

Permalink
Merge pull request #44 from indexdata/PR-2049
Browse files Browse the repository at this point in the history
Pr 2049
  • Loading branch information
JanisSaldabols authored Nov 20, 2024
2 parents ae928d0 + 8789ef5 commit ffe926f
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 3 deletions.
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 1.15.4 2024-11-12
* Add new configuration options
* Make sure default values are used

## 1.15.4 2024-11-11
* Update documentation
* Clean configuration
Expand Down
3 changes: 2 additions & 1 deletion descriptors/ModuleDescriptor-template.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@
"accounts.item.post",
"circulation.requests.item.get",
"circulation.requests.item.put",
"note.types.collection.get"
"note.types.collection.get",
"circulation.loans.add-info.post"
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.folio</groupId>
<artifactId>mod-ncip</artifactId>
<version>1.15.5-SNAPSHOT</version>
<version>1.15.6-SNAPSHOT</version>
<name>NCIP</name>
<description>NCIP responder for FOLIO (internal module)</description>

Expand Down
8 changes: 7 additions & 1 deletion src/main/java/org/folio/ncip/FolioRemoteServiceManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -497,6 +497,11 @@ public JsonObject acceptItem(AcceptItemInitiationData initData, UserId userId, S
throw new FolioNcipException(Constants.REQUEST_ID_MISSING);
}

String callNumber = null;
if (initData.getItemOptionalFields() != null && initData.getItemOptionalFields().getItemDescription() != null) {
callNumber = initData.getItemOptionalFields().getItemDescription().getCallNumber();
}

// VALIDATE PICKUP LOCATION
String pickUpLocationCode = initData.getPickupLocation().getValue();
String sPointId = getServicePointId(pickUpLocationCode, baseUrl);
Expand Down Expand Up @@ -547,7 +552,8 @@ public JsonObject acceptItem(AcceptItemInitiationData initData, UserId userId, S
item.put(Constants.ID, itemUuid.toString());
item.put(Constants.HOLDINGS_RECORD_ID, holdingsUuid.toString());
item.put("discoverySuppress", true);
item.put("itemLevelCallNumber", itemId.getItemIdentifierValue());

item.put("itemLevelCallNumber", StringUtils.isNotBlank(callNumber) ? callNumber : itemId.getItemIdentifierValue());
// PLACE HOLD DOES NOT WORK UNLESS THE ITEM HAS A PERM LOCATION
JsonObject permLocation = new JsonObject();
permLocation.put(Constants.ID, itemLocation);
Expand Down

0 comments on commit ffe926f

Please sign in to comment.