Skip to content

Commit

Permalink
MODINVSTOR-1342: Add "deleted" field to Instance schema
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreiBordak committed Feb 6, 2025
1 parent fbd8c8a commit d7d9314
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ public static Instance mapBulkInstanceRecordToInstance(JsonObject extendedInstan
public static void copyNonMarcControlledFields(Instance targetInstance, Instance sourceInstance) {
targetInstance.setStaffSuppress(sourceInstance.getStaffSuppress());
targetInstance.setDiscoverySuppress(sourceInstance.getDiscoverySuppress());
targetInstance.setDeleted(sourceInstance.getDeleted());
targetInstance.setCatalogedDate(sourceInstance.getCatalogedDate());
targetInstance.setStatusId(sourceInstance.getStatusId());
targetInstance.setStatusUpdatedDate(sourceInstance.getStatusUpdatedDate());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ public void shouldPopulateFieldsNotControlledByMarc() {
Instance sourceInstance = new Instance()
.withDiscoverySuppress(Boolean.TRUE)
.withStaffSuppress(Boolean.TRUE)
.withDeleted(Boolean.TRUE)
.withPreviouslyHeld(Boolean.TRUE)
.withCatalogedDate("1970-01-01")
.withStatusId(UUID.randomUUID().toString())
Expand All @@ -49,6 +50,7 @@ public void shouldPopulateFieldsNotControlledByMarc() {

assertEquals(sourceInstance.getDiscoverySuppress(), targetInstance.getDiscoverySuppress());
assertEquals(sourceInstance.getStaffSuppress(), targetInstance.getStaffSuppress());
assertEquals(sourceInstance.getDeleted(), targetInstance.getDeleted());
assertEquals(sourceInstance.getPreviouslyHeld(), targetInstance.getPreviouslyHeld());
assertEquals(sourceInstance.getCatalogedDate(), targetInstance.getCatalogedDate());
assertEquals(sourceInstance.getStatusId(), targetInstance.getStatusId());
Expand Down

0 comments on commit d7d9314

Please sign in to comment.