Prevent unwanted audit entries appearing when updating the records

This commit is contained in:
Roy Wetherall
2019-11-21 13:54:09 +11:00
parent bbadc9799e
commit 42e6fbdb6a

View File

@@ -362,7 +362,9 @@ public class UpdateRecordScheduleGet extends AbstractWebScript implements Record
{ {
int recordCount = 0; int recordCount = 0;
behaviourFilter.disableBehaviour(recordFolder); behaviourFilter.disableBehaviour(ASPECT_FILE_PLAN_COMPONENT);
try
{
if (logger.isDebugEnabled()) if (logger.isDebugEnabled())
{ {
logger.info("Checking folder: " + recordFolder); logger.info("Checking folder: " + recordFolder);
@@ -388,12 +390,11 @@ public class UpdateRecordScheduleGet extends AbstractWebScript implements Record
{ {
logger.info("updating record: " + record); logger.info("updating record: " + record);
} }
behaviourFilter.disableBehaviour(record);
// update record disposition information
dispositionService.updateNextDispositionAction(record, schedule); dispositionService.updateNextDispositionAction(record, schedule);
innerRecordCount++; innerRecordCount++;
behaviourFilter.enableBehaviour(record);
} }
} }
} }
@@ -401,8 +402,13 @@ public class UpdateRecordScheduleGet extends AbstractWebScript implements Record
return innerRecordCount; return innerRecordCount;
} }
}); });
nodeService.addAspect(recordFolder, ASPECT_DISPOSITION_PROCESSED, null); nodeService.addAspect(recordFolder, ASPECT_DISPOSITION_PROCESSED, null);
behaviourFilter.enableBehaviour(recordFolder); }
finally
{
behaviourFilter.enableBehaviour(ASPECT_FILE_PLAN_COMPONENT);
}
return recordCount; return recordCount;
} }
}, false, true); }, false, true);