WIP Sort working on all types but client-side

This commit is contained in:
Molkobain
2026-05-08 11:07:33 +02:00
parent 55444eaacd
commit ba405e64d2
2 changed files with 10 additions and 3 deletions

View File

@@ -115,10 +115,14 @@ class AjaxRenderController
foreach ($aColumnsLoad[$sAlias] as $sAttCode) {
$aObj[$sAlias."/".$sAttCode] = $aObject[$sAlias]->GetAsHTML($sAttCode);
$oAttDef = MetaModel::GetAttributeDef($sClass, $sAttCode);
// Expose the friendly name of external/hierarchical keys so JS can sort by label
if ($oAttDef->IsExternalKey(EXTKEY_ABSOLUTE)) {
$aObj[$sAlias."/".$sAttCode."/friendlyname"] = $aObject[$sAlias]->Get($sAttCode.'_friendlyname');
}
$bExcludeRawValue = false;
// Only retrieve raw (stored) value for simple fields
foreach (cmdbAbstractObject::GetAttDefClassesToExcludeFromMarkupMetadataRawValue() as $sAttDefClassToExclude) {
$oAttDef = MetaModel::GetAttributeDef($sClass, $sAttCode);
if (is_a($oAttDef, $sAttDefClassToExclude, true)) {
$bExcludeRawValue = true;
break;