diff --git a/ramls/check-in-by-barcode-response.json b/ramls/check-in-by-barcode-response.json index 241777c834..32a97978a6 100644 --- a/ramls/check-in-by-barcode-response.json +++ b/ramls/check-in-by-barcode-response.json @@ -99,6 +99,10 @@ "description": "Volume is intended for monographs when a multipart monograph (e.g. a biography of George Bernard Shaw in three volumes).", "type": "string" }, + "displaySummary": { + "description": "Display summary about the item", + "type": "string" + }, "inTransitDestinationServicePointId": { "description": "Service point an item is intended to be transited to (should only be present when in transit)", "type": "string", diff --git a/ramls/items-in-transit.json b/ramls/items-in-transit.json index 07a0fa333b..ff836ad512 100644 --- a/ramls/items-in-transit.json +++ b/ramls/items-in-transit.json @@ -52,6 +52,10 @@ "description": "The volume of the item", "type": "string" }, + "displaySummary": { + "description": "Display summary about the item", + "type": "string" + }, "yearCaption": { "description": "The year caption of the item", "type": "array", diff --git a/src/main/java/org/folio/circulation/storage/mappers/ItemMapper.java b/src/main/java/org/folio/circulation/storage/mappers/ItemMapper.java index afacbaf7b8..aa56840d65 100644 --- a/src/main/java/org/folio/circulation/storage/mappers/ItemMapper.java +++ b/src/main/java/org/folio/circulation/storage/mappers/ItemMapper.java @@ -41,9 +41,9 @@ private ItemDescription getDescription(JsonObject representation) { getProperty(representation, "copyNumber"), getProperty(representation, "volume"), getProperty(representation, "chronology"), - getProperty(representation, "displaySummary"), getProperty(representation, "numberOfPieces"), getProperty(representation, "descriptionOfPieces"), + getProperty(representation, "displaySummary"), toStream(representation, "yearCaption") .collect(Collectors.toList())); } diff --git a/src/test/java/api/loans/CheckInByBarcodeTests.java b/src/test/java/api/loans/CheckInByBarcodeTests.java index 64a5f4aa55..6b8ee96495 100644 --- a/src/test/java/api/loans/CheckInByBarcodeTests.java +++ b/src/test/java/api/loans/CheckInByBarcodeTests.java @@ -140,7 +140,8 @@ void canCloseAnOpenLoanByCheckingInTheItem() { .withTemporaryLocation(homeLocation.getId()) .withEnumeration("v.70:no.1-6") .withChronology("1987:Jan.-June") - .withVolume("testVolume")); + .withVolume("testVolume") + .withDisplaySummary("test displaySummary")); final IndividualResource loan = checkOutFixture.checkOutByBarcode(nod, james, ZonedDateTime.of(2018, 3, 1, 13, 25, 46, 0, UTC)); @@ -207,6 +208,9 @@ void canCloseAnOpenLoanByCheckingInTheItem() { assertThat("has item chronology", itemFromResponse.getString("chronology"), is("1987:Jan.-June")); + assertThat("has item displaySummary", + itemFromResponse.getString("displaySummary"), is("test displaySummary")); + assertThat("has item volume", itemFromResponse.getString("volume"), is("testVolume")); diff --git a/src/test/java/api/loans/LoanAPITests.java b/src/test/java/api/loans/LoanAPITests.java index e42fb4eb9c..a1af46ac79 100644 --- a/src/test/java/api/loans/LoanAPITests.java +++ b/src/test/java/api/loans/LoanAPITests.java @@ -70,7 +70,8 @@ void canCreateALoan() { item -> item .withEnumeration("v.70:no.1-6") .withChronology("1987:Jan.-June") - .withVolume("testVolume")); + .withVolume("testVolume") + .withDisplaySummary("testDisplaySummary")); UUID itemId = smallAngryPlanet.getId(); @@ -142,6 +143,9 @@ void canCreateALoan() { assertThat("has item volume", loan.getJsonObject("item").getString("volume"), is("testVolume")); + assertThat("has item displaySummary", + loan.getJsonObject("item").getString("displaySummary"), is("testDisplaySummary")); + JsonArray contributors = loan.getJsonObject("item").getJsonArray("contributors"); assertThat("item has a single contributor", diff --git a/src/test/java/api/requests/RequestsAPICreationTests.java b/src/test/java/api/requests/RequestsAPICreationTests.java index 6a782c5890..ae49db5a36 100644 --- a/src/test/java/api/requests/RequestsAPICreationTests.java +++ b/src/test/java/api/requests/RequestsAPICreationTests.java @@ -313,6 +313,7 @@ void canCreateARequest() { assertThat(requestItem.getString("enumeration"), is("enumeration1")); assertThat(requestItem.getString("chronology"), is("chronology")); assertThat(requestItem.getString("volume"), is("vol.1")); + assertThat(requestItem.getString("displaySummary"), is("displaySummary")); JsonArray identifiers = requestInstance.getJsonArray("identifiers"); assertThat(identifiers, notNullValue()); diff --git a/src/test/java/api/support/fixtures/ItemsFixture.java b/src/test/java/api/support/fixtures/ItemsFixture.java index da00079b16..3517dfcd64 100644 --- a/src/test/java/api/support/fixtures/ItemsFixture.java +++ b/src/test/java/api/support/fixtures/ItemsFixture.java @@ -424,7 +424,8 @@ public Function addCallNumberStringComponents(String p .withCallNumber(prefix + "itCn", prefix + "itCnPrefix", prefix + "itCnSuffix") .withEnumeration(prefix + "enumeration1") .withChronology(prefix + "chronology") - .withVolume(prefix + "vol.1"); + .withVolume(prefix + "vol.1") + .withDisplaySummary(prefix + "displaySummary"); } public Function addCallNumberStringComponents() { diff --git a/src/test/java/api/support/http/ResourceClient.java b/src/test/java/api/support/http/ResourceClient.java index 558516054e..844fff542d 100644 --- a/src/test/java/api/support/http/ResourceClient.java +++ b/src/test/java/api/support/http/ResourceClient.java @@ -302,7 +302,7 @@ public IndividualResource create(Builder builder) { public IndividualResource create(JsonObject representation) { - return new IndividualResource(restAssuredClient.post(representation, + return new IndividualResource(restAssuredClient.post(representation, rootUrl(), 201, "create-record")); } diff --git a/src/test/resources/item-storage-8-9.json b/src/test/resources/item-storage-8-9.json index 4a224b5683..12b776a9e6 100644 --- a/src/test/resources/item-storage-8-9.json +++ b/src/test/resources/item-storage-8-9.json @@ -100,6 +100,10 @@ "type": "string", "description": "Chronology is the descriptive information for the dating scheme of a serial." }, + "displaySummary": { + "description": "Display summary about the item", + "type": "string" + }, "yearCaption": { "type": "array", "description": "In multipart monographs, a caption is a character(s) used to label a level of chronology, e.g., year 1985.",