From 8baf2859a4dd1a73e62c837c022f44e02f3a0111 Mon Sep 17 00:00:00 2001 From: Dzmitry_Butramyou Date: Mon, 12 Feb 2024 16:55:01 +0400 Subject: [PATCH] [MODORDERS-1017] - Add displaySummary field --- src/main/java/org/folio/rest/utils/PatronNoticeBuilder.java | 1 + src/test/java/org/folio/rest/impl/FeeFineActionsAPITest.java | 1 + src/test/java/org/folio/rest/utils/PatronNoticeBuilderTest.java | 1 + 3 files changed, 3 insertions(+) diff --git a/src/main/java/org/folio/rest/utils/PatronNoticeBuilder.java b/src/main/java/org/folio/rest/utils/PatronNoticeBuilder.java index 8a325fe0..47f3d61f 100644 --- a/src/main/java/org/folio/rest/utils/PatronNoticeBuilder.java +++ b/src/main/java/org/folio/rest/utils/PatronNoticeBuilder.java @@ -101,6 +101,7 @@ private static JsonObject buildItemContext(FeeFineNoticeContext ctx) { .put("enumeration", item.getEnumeration()) .put("volume", item.getVolume()) .put("chronology", item.getChronology()) + .put("displaySummary", item.getDisplaySummary()) .put("yearCaption", String.join(LIST_VALUES_SEPARATOR, item.getYearCaption())) .put("copy", getCopyNumber(item, holdingsRecord)) .put("numberOfPieces", item.getNumberOfPieces()) diff --git a/src/test/java/org/folio/rest/impl/FeeFineActionsAPITest.java b/src/test/java/org/folio/rest/impl/FeeFineActionsAPITest.java index 396f74f6..7990f70a 100644 --- a/src/test/java/org/folio/rest/impl/FeeFineActionsAPITest.java +++ b/src/test/java/org/folio/rest/impl/FeeFineActionsAPITest.java @@ -333,6 +333,7 @@ public void postActionWithPatronNotice() { .put("enumeration", item.getEnumeration()) .put("volume", item.getVolume()) .put("chronology", item.getChronology()) + .put("displaySummary", item.getDisplaySummary()) .put("yearCaption", "2000") .put("copy", item.getCopyNumber()) .put("numberOfPieces", item.getNumberOfPieces()) diff --git a/src/test/java/org/folio/rest/utils/PatronNoticeBuilderTest.java b/src/test/java/org/folio/rest/utils/PatronNoticeBuilderTest.java index 01112872..18757bb7 100644 --- a/src/test/java/org/folio/rest/utils/PatronNoticeBuilderTest.java +++ b/src/test/java/org/folio/rest/utils/PatronNoticeBuilderTest.java @@ -108,6 +108,7 @@ public void createContextWithAllAvailableFields() { assertEquals(item.getEnumeration(), itemContext.getString("enumeration")); assertEquals(item.getVolume(), itemContext.getString("volume")); assertEquals(item.getChronology(), itemContext.getString("chronology")); + assertEquals(item.getDisplaySummary(), itemContext.getString("displaySummary")); assertEquals("2001; 2000", itemContext.getString("yearCaption")); assertEquals(item.getCopyNumber(), itemContext.getString("copy")); assertEquals(item.getNumberOfPieces(), itemContext.getString("numberOfPieces"));