Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CIRC-2036] Fix issue related to the displaySummary field not being set #1439

Merged
merged 11 commits into from
Mar 11, 2024
4 changes: 4 additions & 0 deletions ramls/check-in-by-barcode-response.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
4 changes: 4 additions & 0 deletions ramls/items-in-transit.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()));
}
Expand Down
6 changes: 5 additions & 1 deletion src/test/java/api/loans/CheckInByBarcodeTests.java
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down Expand Up @@ -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"));

Expand Down
6 changes: 5 additions & 1 deletion src/test/java/api/loans/LoanAPITests.java
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down Expand Up @@ -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",
Expand Down
1 change: 1 addition & 0 deletions src/test/java/api/requests/RequestsAPICreationTests.java
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down
3 changes: 2 additions & 1 deletion src/test/java/api/support/fixtures/ItemsFixture.java
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,8 @@ public Function<ItemBuilder, ItemBuilder> 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<ItemBuilder, ItemBuilder> addCallNumberStringComponents() {
Expand Down
2 changes: 1 addition & 1 deletion src/test/java/api/support/http/ResourceClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -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"));
}

Expand Down
4 changes: 4 additions & 0 deletions src/test/resources/item-storage-8-9.json
Original file line number Diff line number Diff line change
Expand Up @@ -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.",
Expand Down