From d291c4294548222939f2be70f5d84f2d06e895c6 Mon Sep 17 00:00:00 2001 From: Angel Montenegro Date: Mon, 22 Jul 2024 08:19:10 -0600 Subject: [PATCH] Issn loader improvements reset fail count (#7054) * Deactivated records should get 409 on GET requests * Reset fail count when it is updated --- .../scheduler/loader/source/issn/IssnLoadSource.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/orcid-scheduler-web/src/main/java/org/orcid/scheduler/loader/source/issn/IssnLoadSource.java b/orcid-scheduler-web/src/main/java/org/orcid/scheduler/loader/source/issn/IssnLoadSource.java index f59ea373cef..f4aa1f2c09f 100644 --- a/orcid-scheduler-web/src/main/java/org/orcid/scheduler/loader/source/issn/IssnLoadSource.java +++ b/orcid-scheduler-web/src/main/java/org/orcid/scheduler/loader/source/issn/IssnLoadSource.java @@ -174,8 +174,12 @@ private void recordFailure(GroupIdRecordEntity issnEntity, String notes) { private void updateIssnEntity(GroupIdRecordEntity issnEntity, IssnData issnData) { String currentGroupName = issnEntity.getGroupName(); - String updatedGroupName = issnData.getMainTitle(); - + String updatedGroupName = issnData.getMainTitle(); + + // Clear the fail count and reason + issnEntity.setIssnLoaderFailCount(0); + issnEntity.setFailReason(null); + if(!StringUtils.equals(currentGroupName, updatedGroupName)) { issnEntity.setGroupName(updatedGroupName); issnEntity.setClientSourceId(orcidSource.getId());