#564 Prompt for an update in a case log on a lifecycle transition. Can be retrofitted easily. Associated with commit [r3687]

SVN:trunk[3720]
This commit is contained in:
Romain Quetiez
2015-09-04 13:33:04 +00:00
parent c852cd8e09
commit 5153139581

View File

@@ -2398,14 +2398,27 @@ EOF
$iFieldIndex = 0;
$aFieldsMap = array();
// The list of candidate fields is made of the ordered list of "details" attributes + other attributes
$aAttributes = array();
foreach ($this->FlattenZList(MetaModel::GetZListItems($sClass, 'details')) as $sAttCode)
{
$aAttributes[$sAttCode] = true;
}
foreach(MetaModel::GetAttributesList($sClass) as $sAttCode)
{
if (!array_key_exists($sAttCode, $aAttributes))
{
$aAttributes[$sAttCode] = true;
}
}
// Order the fields based on their dependencies, set the fields for which there is only one possible value
// and perform this in the order of dependencies to avoid dead-ends
$aDeps = array();
foreach(MetaModel::GetAttributesList($sClass) as $sAttCode)
foreach($aAttributes as $sAttCode => $trash)
{
$aDeps[$sAttCode] = MetaModel::GetPrequisiteAttributes($sClass, $sAttCode);
}
$aList =$this->OrderDependentFields($aDeps);
$aList = $this->OrderDependentFields($aDeps);
foreach($aList as $sAttCode)
{