From 878b87b68cc89221841add61c6a0352f675bfcd6 Mon Sep 17 00:00:00 2001 From: Pierre Goiffon Date: Fri, 5 Jul 2019 12:10:04 +0200 Subject: [PATCH] =?UTF-8?q?N=C2=B02349=20fix=20GroupBy=20dashlet=20on=20cl?= =?UTF-8?q?asses=20with=20ExternalField=20to=20ExternalField?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/dashlet.class.inc.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/application/dashlet.class.inc.php b/application/dashlet.class.inc.php index 56a20a54a..c62392860 100644 --- a/application/dashlet.class.inc.php +++ b/application/dashlet.class.inc.php @@ -445,14 +445,16 @@ EOF foreach($this->oModelReflection->ListAttributes($sClass) as $sAttCode => $sAttType) { // For external fields, find the real type of the target + $sExtFieldAttCode = $sAttCode; $sTargetClass = $sClass; while (is_a($sAttType, 'AttributeExternalField', true)) { - $sExtKeyAttCode = $this->oModelReflection->GetAttributeProperty($sTargetClass, $sAttCode, 'extkey_attcode'); - $sTargetAttCode = $this->oModelReflection->GetAttributeProperty($sTargetClass, $sAttCode, 'target_attcode'); + $sExtKeyAttCode = $this->oModelReflection->GetAttributeProperty($sTargetClass, $sExtFieldAttCode, 'extkey_attcode'); + $sTargetAttCode = $this->oModelReflection->GetAttributeProperty($sTargetClass, $sExtFieldAttCode, 'target_attcode'); $sTargetClass = $this->oModelReflection->GetAttributeProperty($sTargetClass, $sExtKeyAttCode, 'targetclass'); $aTargetAttCodes = $this->oModelReflection->ListAttributes($sTargetClass); $sAttType = $aTargetAttCodes[$sTargetAttCode]; + $sExtFieldAttCode = $sTargetAttCode; } if (is_a($sAttType, 'AttributeLinkedSet', true)) {