From a143c2da6661caf8d1db78a18bae54208825e562 Mon Sep 17 00:00:00 2001 From: Ronaldo Richieri Date: Mon, 8 Apr 2024 14:55:40 -0300 Subject: [PATCH] Add callback to filter custom field values on ShowCustomFields In some scenarios, it's required to restrict custom field values to be shown on the ticket display page, even if the value was set within the ticket. This commit introduces a callback for post-processing these values, enhancing the flexibility to tailor displayed data. --- share/html/Elements/ShowCustomFields | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/share/html/Elements/ShowCustomFields b/share/html/Elements/ShowCustomFields index 620f550972c..48d54dc3226 100644 --- a/share/html/Elements/ShowCustomFields +++ b/share/html/Elements/ShowCustomFields @@ -53,6 +53,12 @@ % while ( my $CustomField = $CustomFields->Next ) { <%perl> my $Values = $Object->CustomFieldValues( $CustomField->Id ); + +$m->callback( CallbackName => 'MassageCustomFieldValues', + CustomField => $CustomField, + Object => $Object, Grouping => $Grouping, Table => $Table, + CustomFieldValues => $Values, ARGSRef => \%ARGS); + my $count = $Values->Count; next if $HideEmpty and not $count; my $CustomFieldName = $CustomField->Name;