Skip to content

Commit

Permalink
[SIP2-203] - Update NEWS.md and revert the code.
Browse files Browse the repository at this point in the history
  • Loading branch information
gurleenkaurbp committed May 28, 2024
1 parent 967d261 commit f2368c8
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 39 deletions.
6 changes: 6 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## 3.2.2 2024-05-28
* [SIP2-200](https://issues.folio.org/browse/SIP2-200): Enhance WebClient TLS Configuration for Secure Connections to OKAPI
* [SIP2-201](https://issues.folio.org/browse/SIP2-201): Enhance SIP2 Endpoint Security with TLS and FIPS-140-2 Compliant Cryptography
* [SIP2-202](https://issues.folio.org/browse/SIP2-202): Vert.x 4.5.7 fixing netty form POST OOM CVE-2024-29025


## 3.2.0 2024-03-22
* [SIP2-155](https://issues.folio.org/browse/SIP2-155): SIP2: extend the Patron Information Response on fee fields
* [SIP2-177](https://issues.folio.org/browse/SIP2-177): Patron Status Command always returns all statuses as 'Y'
Expand Down
4 changes: 2 additions & 2 deletions 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>edge-sip2</artifactId>
<version>3.2.1-SNAPSHOT</version>
<version>3.2.2-SNAPSHOT</version>
<name>Standard Interchange Protocol v2 (SIP2)</name>
<url>https://github.com/folio-org/edge-sip2</url>
<description>Support for SIP2 in FOLIO. This allow self service circulation and patron services stations to perform supported operations in FOLIO.</description>
Expand Down Expand Up @@ -188,7 +188,7 @@
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcpkix-jdk15to18</artifactId>
<version>1.74</version>
<version>1.78</version>
<scope>test</scope>
</dependency>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,6 @@ public Future<CheckinResponse> performCheckinCommand(Checkin checkin, SessionDat
.itemIdentifier(itemIdentifier)
.callNumber(valuesJson.getString("callNumber"))
.mediaType(mediaType)
.patronIdentifier(getRequestPatronBarcode(requestArray))
.pickupServicePoint(valuesJson.getString("servicePoint"))
// if the title is not available, use the item identifier passed in to the
// checkin.
Expand Down Expand Up @@ -957,19 +956,4 @@ private String getRequestState(JsonArray requestArray) {
}
return request.getString("requestType");
}

protected String getRequestPatronBarcode(JsonArray requestArray) {
if (requestArray == null || requestArray.isEmpty()) {
return null;
}
JsonObject request = requestArray.getJsonObject(0);
if (request == null) {
return null;
}
JsonObject requesterJson = request.getJsonObject("requester");
if (requesterJson == null) {
return null;
}
return requesterJson.getString("barcode");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ void canCheckin(Vertx vertx,
final String itemIdentifier = "1234567890";
final String titleIdentifier = "Some Cool Book";
final String callNumber = "9983235487258";
final String patronBarcode = "1122334455";
final Checkin checkin = Checkin.builder()
.noBlock(FALSE)
.transactionDate(OffsetDateTime.now())
Expand Down Expand Up @@ -121,11 +120,7 @@ void canCheckin(Vertx vertx,
.put("requests", new JsonArray()
.add(new JsonObject()
.put("requestType", "Hold")
.put("requestLevel", "Item")
.put("requester", new JsonObject()
.put("barcode", patronBarcode))
)
)
.put("requestLevel", "Item")))
.put("totalRecords", 1);

when(mockFolioProvider.createResource(any()))
Expand Down Expand Up @@ -157,7 +152,7 @@ void canCheckin(Vertx vertx,
assertEquals("Main Library", checkinResponse.getPermanentLocation());
assertEquals(titleIdentifier, checkinResponse.getTitleIdentifier());
assertNull(checkinResponse.getSortBin());
assertEquals(patronBarcode, checkinResponse.getPatronIdentifier());
assertNull(checkinResponse.getPatronIdentifier());
assertEquals(MediaType.BOOK, checkinResponse.getMediaType());
assertNull(checkinResponse.getItemProperties());
assertNull(checkinResponse.getScreenMessage());
Expand Down Expand Up @@ -1628,18 +1623,4 @@ void testGetAlertType() {
assertNull(CirculationRepository.getAlertType(
false, false, false));
}

@Test void testGetRequestPatronBarcode(
@Mock IResourceProvider<IRequestData> mockFolioProvider,
@Mock PasswordVerifier mockPasswordVerifier,
@Mock ItemRepository mockItemrepository) {
final Clock clock = TestUtils.getUtcFixedClock();
CirculationRepository circulationRepository
= new CirculationRepository(mockFolioProvider, mockPasswordVerifier,
mockItemrepository, clock);
assertNull(circulationRepository.getRequestPatronBarcode(null));
assertNull(circulationRepository.getRequestPatronBarcode(new JsonArray()));
assertNull(circulationRepository.getRequestPatronBarcode(new JsonArray()
.add(new JsonObject())));
}
}

0 comments on commit f2368c8

Please sign in to comment.