diff --git a/application/displayblock.class.inc.php b/application/displayblock.class.inc.php index aabc9a6ab..37515dd1e 100644 --- a/application/displayblock.class.inc.php +++ b/application/displayblock.class.inc.php @@ -1684,19 +1684,16 @@ JS $aRes = CMDBSource::QueryToArray($sSql); $oContext = new ApplicationContext(); $sContextParam = $oContext->GetForLink(); - /** @var AttributeDefinition $oGroupByAttDef */ - $oGroupByAttDef = $aGroupBy["grouped_by_1"]->GetAttDef(); $iTotalCount = 0; $aURLs = array(); foreach ($aRes as $iRow => $aRow) { $sValue = $aRow['grouped_by_1']; - $sPlainTextValue = $oGroupByAttDef->GetValueLabel($sValue); - $sHtmlValue = utils::EscapeHtml($sPlainTextValue); + $sHtmlValue = $oGroupByExp->MakeValueLabel($this->m_oFilter, $sValue, $sValue); $iTotalCount += $aRow['_itop_count_']; $aValues[] = array( - 'label' => $sPlainTextValue, + 'label' => html_entity_decode(strip_tags($sHtmlValue), ENT_QUOTES, 'UTF-8'), 'label_html' => $sHtmlValue, 'value' => (float)$aRow[$sFctVar], ); diff --git a/tests/php-unit-tests/unitary-tests/application/DisplayBlock/DisplayBlockTest.php b/tests/php-unit-tests/unitary-tests/application/DisplayBlock/DisplayBlockTest.php index f111d101e..bb80440c1 100644 --- a/tests/php-unit-tests/unitary-tests/application/DisplayBlock/DisplayBlockTest.php +++ b/tests/php-unit-tests/unitary-tests/application/DisplayBlock/DisplayBlockTest.php @@ -57,6 +57,8 @@ class DisplayBlockTest extends ItopCustomDatamodelTestCase */ public function testRenderChartAjax(string $sClassToDisplay, string $sAttributeToDisplay, string $sRelatedClass, string $sRelatedClassAttributeToEdit, string $sExpected, string $sNonExpected): void { + $this->markTestSkipped("Waiting for N°7313 to be fixed, this test was made during the first attempt to resolve N°7313, but as it broke N°7592, N°7594, N°7600 & N°7605, we reverted the change until we make a proper fix in Expression::MakeValueLabel()"); + $oUserRequest = new UserRequest(); $oUserRequest->Set('title', 'MyTitle'); $oUserRequest->Set('org_id', $this->getTestOrgId());