From 97d11ba91021bb426a03affbb8ce0713ac3ca4a5 Mon Sep 17 00:00:00 2001 From: Romain Quetiez Date: Fri, 30 Sep 2016 14:16:35 +0000 Subject: [PATCH] N.445 Specifying a date format (other than the default one) and allowing to create a user request in the resolved status results in an error when selecting the resolved status. SVN:trunk[4433] --- application/wizardhelper.class.inc.php | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/application/wizardhelper.class.inc.php b/application/wizardhelper.class.inc.php index 6c5f516990..fa241873e0 100644 --- a/application/wizardhelper.class.inc.php +++ b/application/wizardhelper.class.inc.php @@ -138,6 +138,22 @@ class WizardHelper $oObj->Set($sAttCode, $value); } } + else if ($oAttDef instanceof AttributeDateTime) // AttributeDate is derived from AttributeDateTime + { + if ($value != null) + { + $oDate = $oAttDef->GetFormat()->Parse($value); + if ($oDate instanceof DateTime) + { + $value = $oDate->format($oAttDef->GetInternalFormat()); + } + else + { + $value = null; + } + } + $oObj->Set($sAttCode, $value); + } else { $oObj->Set($sAttCode, $value);