Skip to content

Commit 5caca27

Browse files
authored
Fix: tag not added by rules (#273)
1 parent 636bf61 commit 5caca27

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

inc/tagitem.class.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,8 @@ public static function updateItem(CommonDBTM $item, bool $delete_existing_tags =
426426
// the mail collector which wont set the _plugin_tag_tag_process_form
427427
// flag
428428
$item::getType() == Ticket::getType()
429-
&& $item->fields['date_creation'] == $_SESSION['glpi_currenttime']
429+
// Allow a few seconds difference if glpi_currenttime changed
430+
&& abs(strtotime($item->fields['date_creation']) - strtotime($_SESSION['glpi_currenttime'])) < 5
430431
)
431432
) {
432433
return true;

0 commit comments

Comments
 (0)