(Retrofit from trunk) 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:2.3[4434]
This commit is contained in:
Romain Quetiez
2016-09-30 14:18:24 +00:00
parent 42a882ae62
commit 2a9a373c61

View File

@@ -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);