From 0e8ddf990c2a0b181282f0d9d01c43468ca9c21e Mon Sep 17 00:00:00 2001 From: Eric Espie Date: Tue, 7 Jan 2025 13:21:13 +0100 Subject: [PATCH] =?UTF-8?q?N=C2=B07145=20-=20UI=20-=20Init=20Value=20DateT?= =?UTF-8?q?ime=20and=20Date=20with=20Day=20Time=20(Fix=20Event=20class)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/event.class.inc.php | 2 +- tests/php-unit-tests/unitary-tests/core/EventIssueTest.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/core/event.class.inc.php b/core/event.class.inc.php index 90d900257..6a731f1cc 100644 --- a/core/event.class.inc.php +++ b/core/event.class.inc.php @@ -39,7 +39,7 @@ class Event extends DBObject implements iDisplay MetaModel::Init_Params($aParams); //MetaModel::Init_InheritAttributes(); MetaModel::Init_AddAttribute(new AttributeText("message", array("allowed_values"=>null, "sql"=>"message", "default_value"=>null, "is_null_allowed"=>false, "depends_on"=>array()))); - MetaModel::Init_AddAttribute(new AttributeDateTime("date", array("allowed_values"=>null, "sql"=>"date", "default_value"=>"", "is_null_allowed"=>false, "depends_on"=>array()))); + MetaModel::Init_AddAttribute(new AttributeDateTime("date", array("allowed_values"=>null, "sql"=>"date", "default_value"=>"now", "is_null_allowed"=>false, "depends_on"=>array()))); MetaModel::Init_AddAttribute(new AttributeString("userinfo", array("allowed_values"=>null, "sql"=>"userinfo", "default_value"=>null, "is_null_allowed"=>true, "depends_on"=>array()))); // MetaModel::Init_AddAttribute(new AttributeString("userinfo", array("allowed_values"=>null, "sql"=>"userinfo", "default_value"=>null, "is_null_allowed"=>true, "depends_on"=>array()))); diff --git a/tests/php-unit-tests/unitary-tests/core/EventIssueTest.php b/tests/php-unit-tests/unitary-tests/core/EventIssueTest.php index 62faa35a4..400a37180 100644 --- a/tests/php-unit-tests/unitary-tests/core/EventIssueTest.php +++ b/tests/php-unit-tests/unitary-tests/core/EventIssueTest.php @@ -62,7 +62,7 @@ class EventIssueTest extends ItopDataTestCase $oEventIssue->DBInsert(); } catch (CoreException $e) { - $this->fail('we should be able to persist the object though it contains long values in its attributes'); + $this->fail('we should be able to persist the object though it contains long values in its attributes: '.$e->getMessage()); } $this->assertTrue(true); }