mirror of
https://github.com/Kingsrook/qqq.git
synced 2025-07-18 05:01:07 +00:00
Update to not audit automation status changes
This commit is contained in:
@ -155,6 +155,7 @@ public class RecordAutomationStatusUpdater
|
|||||||
.withValue(table.getPrimaryKeyField(), r.getValue(table.getPrimaryKeyField()))
|
.withValue(table.getPrimaryKeyField(), r.getValue(table.getPrimaryKeyField()))
|
||||||
.withValue(automationDetails.getStatusTracking().getFieldName(), r.getValue(automationDetails.getStatusTracking().getFieldName()))).toList());
|
.withValue(automationDetails.getStatusTracking().getFieldName(), r.getValue(automationDetails.getStatusTracking().getFieldName()))).toList());
|
||||||
updateInput.setAreAllValuesBeingUpdatedTheSame(true);
|
updateInput.setAreAllValuesBeingUpdatedTheSame(true);
|
||||||
|
updateInput.setOmitDmlAudit(true);
|
||||||
|
|
||||||
new UpdateAction().execute(updateInput);
|
new UpdateAction().execute(updateInput);
|
||||||
}
|
}
|
||||||
|
@ -75,7 +75,14 @@ public class UpdateAction
|
|||||||
UpdateOutput updateResult = qModule.getUpdateInterface().execute(updateInput);
|
UpdateOutput updateResult = qModule.getUpdateInterface().execute(updateInput);
|
||||||
// todo post-customization - can do whatever w/ the result if you want
|
// todo post-customization - can do whatever w/ the result if you want
|
||||||
|
|
||||||
new DMLAuditAction().execute(new DMLAuditInput().withTableActionInput(updateInput).withRecordList(updateResult.getRecords()).withOldRecordList(oldRecordList));
|
if(updateInput.getOmitDmlAudit())
|
||||||
|
{
|
||||||
|
LOG.debug("Requested to omit DML audit");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
new DMLAuditAction().execute(new DMLAuditInput().withTableActionInput(updateInput).withRecordList(updateResult.getRecords()).withOldRecordList(oldRecordList));
|
||||||
|
}
|
||||||
|
|
||||||
return updateResult;
|
return updateResult;
|
||||||
}
|
}
|
||||||
@ -87,6 +94,11 @@ public class UpdateAction
|
|||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
private static List<QRecord> getOldRecordListForAuditIfNeeded(UpdateInput updateInput)
|
private static List<QRecord> getOldRecordListForAuditIfNeeded(UpdateInput updateInput)
|
||||||
{
|
{
|
||||||
|
if(updateInput.getOmitDmlAudit())
|
||||||
|
{
|
||||||
|
return (null);
|
||||||
|
}
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
AuditLevel auditLevel = DMLAuditAction.getAuditLevel(updateInput);
|
AuditLevel auditLevel = DMLAuditAction.getAuditLevel(updateInput);
|
||||||
|
@ -45,6 +45,8 @@ public class UpdateInput extends AbstractTableActionInput
|
|||||||
////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
private Boolean areAllValuesBeingUpdatedTheSame = null;
|
private Boolean areAllValuesBeingUpdatedTheSame = null;
|
||||||
|
|
||||||
|
private boolean omitDmlAudit = false;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
@ -132,4 +134,35 @@ public class UpdateInput extends AbstractTableActionInput
|
|||||||
this.areAllValuesBeingUpdatedTheSame = areAllValuesBeingUpdatedTheSame;
|
this.areAllValuesBeingUpdatedTheSame = areAllValuesBeingUpdatedTheSame;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*******************************************************************************
|
||||||
|
** Getter for omitDmlAudit
|
||||||
|
*******************************************************************************/
|
||||||
|
public boolean getOmitDmlAudit()
|
||||||
|
{
|
||||||
|
return (this.omitDmlAudit);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*******************************************************************************
|
||||||
|
** Setter for omitDmlAudit
|
||||||
|
*******************************************************************************/
|
||||||
|
public void setOmitDmlAudit(boolean omitDmlAudit)
|
||||||
|
{
|
||||||
|
this.omitDmlAudit = omitDmlAudit;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*******************************************************************************
|
||||||
|
** Fluent setter for omitDmlAudit
|
||||||
|
*******************************************************************************/
|
||||||
|
public UpdateInput withOmitDmlAudit(boolean omitDmlAudit)
|
||||||
|
{
|
||||||
|
this.omitDmlAudit = omitDmlAudit;
|
||||||
|
return (this);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user