From 11308dc76abd33b66529f9adbc1ec233651ad5b9 Mon Sep 17 00:00:00 2001 From: Molkobain Date: Wed, 3 Oct 2018 17:24:08 +0200 Subject: [PATCH] =?UTF-8?q?N=C2=B01059=20Fix=20new=20empty=20caselog=20ent?= =?UTF-8?q?ry=20on=20bulk=20modification.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/cmdbabstract.class.inc.php | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/application/cmdbabstract.class.inc.php b/application/cmdbabstract.class.inc.php index 6168093cf..0a74ff89a 100644 --- a/application/cmdbabstract.class.inc.php +++ b/application/cmdbabstract.class.inc.php @@ -1757,6 +1757,27 @@ EOF $sConfigJS = json_encode($aConfig); $oPage->add_ready_script("$('#$iId').ckeditor(function() { /* callback code */ }, $sConfigJS);"); // Transform $iId into a CKEdit + + $oPage->add_ready_script( +<<Get($sAttCode); if ($oAttDef instanceof AttributeCaseLog) { - $currValue = ' '; // Don't put an empty string, in case the field would be considered as mandatory... + $currValue = ''; // Put a single scalar value to force caselog to mock a new entry. For more info see N°1059. } if (is_object($currValue)) continue; // Skip non scalar values... if(!array_key_exists($currValue, $aValues[$sAttCode]))