Skip to content

Commit

Permalink
[MODORDERS-1010] - Change "caption" to "Display summary" for checkin …
Browse files Browse the repository at this point in the history
…and receiving collections (#826)

* [MODORDERS-1010] - Change "caption" to "Display summary" for checkin and receiving collections
  • Loading branch information
imerabishvili authored Jan 30, 2024
1 parent b85aa14 commit a509d4c
Show file tree
Hide file tree
Showing 23 changed files with 75 additions and 75 deletions.
8 changes: 4 additions & 4 deletions descriptors/ModuleDescriptor-template.json
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@
},
{
"id": "receiving",
"version": "1.2",
"version": "2.0",
"handlers": [
{
"methods": [
Expand Down Expand Up @@ -475,7 +475,7 @@
},
{
"id": "pieces",
"version": "2.1",
"version": "3.0",
"handlers": [
{
"methods": ["GET"],
Expand Down Expand Up @@ -1062,11 +1062,11 @@
},
{
"id": "orders-storage.pieces",
"version": "4.0"
"version": "5.0"
},
{
"id": "orders-storage.receiving-history",
"version": "3.2"
"version": "4.0"
},
{
"id": "orders-storage.reporting-codes",
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/folio/helper/CheckinHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ private void updatePieceWithCheckinInfo(Piece piece) {
CheckInPiece checkinPiece = piecesByLineId.get(piece.getPoLineId())
.get(piece.getId());

piece.setCaption(checkinPiece.getCaption());
piece.setDisplaySummary(checkinPiece.getDisplaySummary());
piece.setComment(checkinPiece.getComment());

if (StringUtils.isNotEmpty(checkinPiece.getLocationId())) {
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/folio/helper/ReceivingHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ private void updatePieceWithReceivingInfo(Piece piece) {
ReceivedItem receivedItem = piecesByLineId.get(piece.getPoLineId())
.get(piece.getId());

piece.setCaption(receivedItem.getCaption());
piece.setDisplaySummary(receivedItem.getDisplaySummary());
piece.setComment(receivedItem.getComment());
if (StringUtils.isNotEmpty(receivedItem.getLocationId())) {
piece.setLocationId(receivedItem.getLocationId());
Expand Down
14 changes: 7 additions & 7 deletions src/test/java/org/folio/helper/CheckinHelperTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -95,17 +95,17 @@ void shouldTestGetItemCreateNeededCheckinPieces() {
String poLine2 = UUID.randomUUID().toString();
CheckinCollection checkinCollection = new CheckinCollection();
ToBeCheckedIn toBeCheckedIn1 = new ToBeCheckedIn().withPoLineId(poLine1);
CheckInPiece checkInPiece1 = new CheckInPiece().withId(UUID.randomUUID().toString()).withCreateItem(true).withCaption("1");
CheckInPiece checkInPiece2 = new CheckInPiece().withId(UUID.randomUUID().toString()).withCreateItem(false).withCaption("2");
CheckInPiece checkInPiece1 = new CheckInPiece().withId(UUID.randomUUID().toString()).withCreateItem(true).withDisplaySummary("1");
CheckInPiece checkInPiece2 = new CheckInPiece().withId(UUID.randomUUID().toString()).withCreateItem(false).withDisplaySummary("2");
toBeCheckedIn1.withCheckInPieces(List.of(checkInPiece1, checkInPiece2));

ToBeCheckedIn toBeCheckedIn2 = new ToBeCheckedIn().withPoLineId(poLine1);
CheckInPiece checkInPiece3 = new CheckInPiece().withId(UUID.randomUUID().toString()).withCreateItem(true).withCaption("3")
CheckInPiece checkInPiece3 = new CheckInPiece().withId(UUID.randomUUID().toString()).withCreateItem(true).withDisplaySummary("3")
.withEnumeration("Enum1").withCopyNumber("CN1").withChronology("Ch1").withDiscoverySuppress(true).withDisplayOnHolding(true);
toBeCheckedIn2.withCheckInPieces(List.of(checkInPiece3));

ToBeCheckedIn toBeCheckedIn3 = new ToBeCheckedIn().withPoLineId(poLine2);
CheckInPiece checkInPiece4 = new CheckInPiece().withId(UUID.randomUUID().toString()).withCreateItem(true).withCaption("4")
CheckInPiece checkInPiece4 = new CheckInPiece().withId(UUID.randomUUID().toString()).withCreateItem(true).withDisplaySummary("4")
.withEnumeration("Enum2").withCopyNumber("CN2").withChronology("Ch2").withDiscoverySuppress(false).withDisplayOnHolding(false);
toBeCheckedIn3.withCheckInPieces(List.of(checkInPiece4));

Expand All @@ -120,16 +120,16 @@ void shouldTestGetItemCreateNeededCheckinPieces() {

assertEquals(1, map.get(poLine2).size());
CheckInPiece actCheckInPiece1 = map.get(poLine1).stream()
.filter(checkInPiece -> "3".equals(checkInPiece.getCaption()))
.filter(checkInPiece -> "3".equals(checkInPiece.getDisplaySummary()))
.findFirst().get();
assertEquals("3", actCheckInPiece1.getCaption());
assertEquals("3", actCheckInPiece1.getDisplaySummary());
assertEquals("Enum1", actCheckInPiece1.getEnumeration());
assertEquals("CN1", actCheckInPiece1.getCopyNumber());
assertEquals("Ch1", actCheckInPiece1.getChronology());
assertEquals(true, actCheckInPiece1.getDiscoverySuppress());
assertEquals(true, actCheckInPiece1.getDisplayOnHolding());
CheckInPiece actCheckInPiece2 = map.get(poLine2).get(0);
assertEquals("4", actCheckInPiece2.getCaption());
assertEquals("4", actCheckInPiece2.getDisplaySummary());
assertEquals("Enum2", actCheckInPiece2.getEnumeration());
assertEquals("CN2", actCheckInPiece2.getCopyNumber());
assertEquals("Ch2", actCheckInPiece2.getChronology());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -523,7 +523,7 @@ void shouldNotTryToUpdateItemWhenUpdatingPieceThatDoesNotHaveItem()
JsonObject holding = new JsonObject().put(ID, holdingId);
holding.put(HOLDING_PERMANENT_LOCATION_ID, UUID.randomUUID().toString());
Piece pieceFromStorage = new Piece().withId(pieceId).withTitleId(titleId).withPoLineId(lineId).withHoldingId(holdingId).withFormat(Piece.Format.PHYSICAL);
Piece pieceToUpdate = new Piece().withId(pieceId).withTitleId(titleId).withPoLineId(lineId).withHoldingId(holdingId).withFormat(Piece.Format.PHYSICAL).withCaption(caption);
Piece pieceToUpdate = new Piece().withId(pieceId).withTitleId(titleId).withPoLineId(lineId).withHoldingId(holdingId).withFormat(Piece.Format.PHYSICAL).withDisplaySummary(caption);
Location loc = new Location().withHoldingId(holdingId).withQuantityElectronic(1).withQuantity(1);
Cost cost = new Cost().withQuantityElectronic(1);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"barcode": "",
"callNumber": "PR 8923 W6 L36 1990 c.3",
"comment": "Very important note",
"caption": "Vol. 1",
"displaySummary": "Vol. 1",
"createItem": false,
"supplement": false,
"locationId": "fcd64ce1-6995-48f0-840e-89ffa2288371",
Expand All @@ -26,7 +26,7 @@
"barcode": "",
"callNumber": "BF2050 .M335 1999",
"comment": "Very important note",
"caption": "Vol. 2",
"displaySummary": "Vol. 2",
"createItem": false,
"supplement": true,
"locationId": "f34d27c6-a8eb-461b-acd6-5dea81771e70",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"barcode": "6015021",
"callNumber": "PR 8923 W6 L36 1990 c.3",
"comment": "Checkin Physical",
"caption": "Vol. 1",
"displaySummary": "Vol. 1",
"createItem": false,
"supplement": false,
"locationId": "fcd64ce1-6995-48f0-840e-89ffa2288371",
Expand All @@ -25,7 +25,7 @@
"barcode": "6015022",
"callNumber": "BF2050 .M335 1999",
"comment": "Checkin Physical",
"caption": "Vol. 2",
"displaySummary": "Vol. 2",
"createItem": false,
"supplement": true,
"locationId": "f34d27c6-a8eb-461b-acd6-5dea81771e70",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"id": "af372ac8-5ffb-4560-8b96-3945a12e121b",
"caption": "Tutorial Volume 5",
"displaySummary": "Tutorial Volume 5",
"comment": "Special Edition",
"format": "Physical",
"itemId": "522a501a-56b5-48d9-b28a-3a8f02482d97",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"id": "fccaca78-ee0b-4579-930d-670bf5102ab0",
"caption": "Tutorial Volume 5",
"displaySummary": "Tutorial Volume 5",
"comment": "Special Edition",
"format": "Physical",
"itemId": "522a501a-56b5-48d9-b28a-3a8f02482d97",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"id": "5dbe5481-e5c1-4119-95bc-58e52ffd8374",
"caption": "Tutorial Volume 13",
"displaySummary": "Tutorial Volume 13",
"comment": "Standard Edition",
"format": "Electronic",
"itemId": "522a501a-56b5-48d9-b28a-3a8f02482d97",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"id": "4e717549-f915-47d6-b300-3672a7d7970f",
"caption": "Tutorial Volume 12",
"displaySummary": "Tutorial Volume 12",
"comment": "Special Edition 3",
"format": "Physical",
"itemId": "522a501a-56b5-48d9-b28a-3a8f02482d97",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"id": "5b454292-6aaa-474f-9510-b59a564e0c8d",
"caption": "Tutorial Volume 9",
"displaySummary": "Tutorial Volume 9",
"comment": "Special Edition 9",
"format": "Physical",
"itemId": "522a501a-56b5-48d9-b28a-3a8f02482d97",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"id": "7d0aa803-a659-49f0-8a95-968f277c87d7",
"caption": "Tutorial Volume 9",
"displaySummary": "Tutorial Volume 9",
"comment": "Special Edition 9",
"format": "Physical",
"itemId": "522a501a-56b5-48d9-b28a-3a8f02482d97",
Expand Down
2 changes: 1 addition & 1 deletion src/test/resources/mockdata/pieces/pieceRecord.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"caption": "Tutorial Volume 5",
"displaySummary": "Tutorial Volume 5",
"comment": "Special Edition",
"format": "Physical",
"itemId": "522a501a-56b5-48d9-b28a-3a8f02482d97",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"pieces": [
{
"id": "526bfa1a-5371-415f-998a-ac8ce4425b18",
"caption": "Tutorial Volume 6",
"displaySummary": "Tutorial Volume 6",
"comment": "Standard Edition",
"format": "Physical",
"itemId": "522a501a-56b5-48d9-b28a-3a8f02482d97",
Expand All @@ -16,7 +16,7 @@
},
{
"id": "7802b94d-68b4-41e5-91ff-0cee8cd8f029",
"caption": "Tutorial Volume 7",
"displaySummary": "Tutorial Volume 7",
"comment": "Standard Edition II",
"locationId": "fcd64ce1-6995-48f0-840e-89ffa2288371",
"poLineId": "d471d766-8dbb-4609-999a-02681dea6c22",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@
},
{
"id": "7802b94d-68b4-41e5-91ff-0cee8cd8f029",
"caption": "Vol. 1",
"displaySummary": "Vol. 1",
"comment": "Very important note",
"locationId": "fcd64ce1-6995-48f0-840e-89ffa2288371",
"poLineId": "fe47e95d-24e9-4a9a-9dc0-bcba64b51f56",
Expand All @@ -372,7 +372,7 @@
},
{
"id": "4d19a3ff-986f-4150-95a2-2f2da797591c",
"caption": "Vol. 1",
"displaySummary": "Vol. 1",
"comment": "Very important note",
"itemId": "a940a524-ec08-42a4-8e63-2b7f8194371e",
"locationId": "fcd64ce1-6995-48f0-840e-89ffa2288371",
Expand All @@ -384,7 +384,7 @@
},
{
"id": "6a53eb3c-f9dd-46f5-bbf8-5768cf97ec6d",
"caption": "Vol. 1",
"displaySummary": "Vol. 1",
"comment": "Very important note",
"itemId": "fbd41843-569b-4a15-95da-6d543fe489ad",
"titleId": "9a665b22-9fe5-4c95-b4ee-837a5433c95d",
Expand All @@ -396,7 +396,7 @@
},
{
"id": "61437764-03e4-4c75-a743-d40f71ff9161",
"caption": "Vol. 1",
"displaySummary": "Vol. 1",
"comment": "Very important note",
"itemId": "821559ef-4ee7-4b19-a835-a6787c2bafb9",
"titleId": "9a665b22-9fe5-4c95-b4ee-837a5433c95d",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,39 +7,39 @@
{
"barcode": 21111111112,
"comment": "Very important note",
"caption": "Vol. 1",
"displaySummary": "Vol. 1",
"itemStatus": "In process",
"locationId": "fcd64ce1-6995-48f0-840e-89ffa2288371",
"pieceId": "36840b87-b4b4-48dd-b2fc-a5370df4034a"
},
{
"barcode": 21111111113,
"comment": "Very important note",
"caption": "Vol. 1",
"displaySummary": "Vol. 1",
"itemStatus": "In process",
"locationId": "fcd64ce1-6995-48f0-840e-89ffa2288371",
"pieceId": "2d10cd5a-8325-4873-a940-2fcf838a54af"
},
{
"barcode": 21111111114,
"comment": "Very important note",
"caption": "Vol. 1",
"displaySummary": "Vol. 1",
"itemStatus": "In process",
"locationId": "fcd64ce1-6995-48f0-840e-89ffa2288371",
"pieceId": "f8bb5de0-fa1c-49b7-82b3-c2c2dfd0925d"
},
{
"barcode": 21111111115,
"comment": "Very important note",
"caption": "Vol. 1",
"displaySummary": "Vol. 1",
"itemStatus": "In process",
"locationId": "fcd64ce1-6995-48f0-840e-89ffa2288371",
"pieceId": "73d7c872-ce17-4b6c-9729-309e844fef9b"
},
{
"barcode": 21111111116,
"comment": "Very important note",
"caption": "Vol. 1",
"displaySummary": "Vol. 1",
"itemStatus": "In process",
"locationId": "fcd64ce1-6995-48f0-840e-89ffa2288371",
"pieceId": "2beff851-d9df-4a8d-a65b-762c9d78340d"
Expand Down
Loading

0 comments on commit a509d4c

Please sign in to comment.