Fixed #19052 - PUT next_audit_date does not produce audit log entry

This commit is contained in:
snipe
2026-05-21 16:11:08 +01:00
parent 43be1e8364
commit ce0ce8688b
+3 -3
View File
@@ -35,12 +35,12 @@ class AssetObserver
$same_checkin_counter = (($attributes['checkin_counter'] == $attributesOriginal['checkin_counter']));
}
// If the asset isn't being checked out or audited, log the update.
// (Those other actions already create log entries.)
// If the asset isn't being checked out, log the update.
// (Checkout/checkin/audit actions already create their own log entries; the audit
// path uses unsetEventDispatcher() so it never reaches this observer.)
if (array_key_exists('assigned_to', $attributes) && array_key_exists('assigned_to', $attributesOriginal)
&& ($attributes['assigned_to'] == $attributesOriginal['assigned_to'])
&& ($same_checkout_counter) && ($same_checkin_counter)
&& ((isset($attributes['next_audit_date']) ? $attributes['next_audit_date'] : null) == (isset($attributesOriginal['next_audit_date']) ? $attributesOriginal['next_audit_date'] : null))
&& ($attributes['last_checkout'] == $attributesOriginal['last_checkout']) && (! $restoring_or_deleting)) {
$changed = [];