Skip to content

Commit

Permalink
MODBULKOPS-429 - Commit changes - MARC Bib records with administrativ…
Browse files Browse the repository at this point in the history
…e data
  • Loading branch information
siarhei-charniak authored and Siarhei Charniak committed Jan 27, 2025
1 parent 823a881 commit fea9522
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public void updateAssociatedRecords(T t, BulkOperation operation, boolean notCha
var errorMessage = INSTANCE_MARC.equals(operation.getEntityType()) ?
MSG_NO_ADMINISTRATIVE_CHANGE_REQUIRED :
MSG_NO_CHANGE_REQUIRED;
errorService.saveError(operation.getId(), t.getIdentifier(operation.getIdentifierType()), errorMessage);
errorService.saveError(operation.getId(), t.getIdentifier(operation.getIdentifierType()), errorMessage, ErrorType.WARNING);
}
}
}
2 changes: 1 addition & 1 deletion src/main/java/org/folio/bulkops/service/ErrorService.java
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public class ErrorService {
private final BulkEditClient bulkEditClient;
private final MetadataProviderClient metadataProviderClient;

public void saveError(UUID bulkOperationId, String identifier, String errorMessage, String uiErrorMessage, String link) {
public void saveError(UUID bulkOperationId, String identifier, String errorMessage, String uiErrorMessage, String link, ErrorType errorType) {
if (Set.of(MSG_NO_CHANGE_REQUIRED, MSG_NO_ADMINISTRATIVE_CHANGE_REQUIRED, MSG_NO_MARC_CHANGE_REQUIRED).contains(errorMessage)
&& executionContentRepository.findFirstByBulkOperationIdAndIdentifier(bulkOperationId, identifier).isPresent()) {
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ private String prepareCommittedFile(BulkOperation bulkOperation) throws IOExcept
var identifier = HRID.equals(bulkOperation.getIdentifierType()) ?
originalRecord.getControlNumber() :
fetchInstanceUuidOrElseHrid(originalRecord);
errorService.saveError(bulkOperation.getId(), identifier, MSG_NO_MARC_CHANGE_REQUIRED);
errorService.saveError(bulkOperation.getId(), identifier, MSG_NO_MARC_CHANGE_REQUIRED, ErrorType.WARNING);
} else {
MarcDateHelper.updateDateTimeControlField(modifiedRecord, currentDate);
writerForResultMarcFile.writeRecord(modifiedRecord);
Expand Down

0 comments on commit fea9522

Please sign in to comment.