[Rt-commit] rt branch 5.0/add-callback-after-values-show-custom-fields created. rt-5.0.5-163-g4f8262b38d
BPS Git Server
git at git.bestpractical.com
Fri Mar 1 15:44:13 UTC 2024
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "rt".
The branch, 5.0/add-callback-after-values-show-custom-fields has been created
at 4f8262b38daa9086457f9f4238dbb316ed0ecc94 (commit)
- Log -----------------------------------------------------------------
commit 4f8262b38daa9086457f9f4238dbb316ed0ecc94
Author: Ronaldo Richieri <ronaldo at bestpractical.com>
Date: Fri Mar 1 12:36:03 2024 -0300
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.
diff --git a/share/html/Elements/ShowCustomFields b/share/html/Elements/ShowCustomFields
index 620f550972..500575129d 100644
--- a/share/html/Elements/ShowCustomFields
+++ b/share/html/Elements/ShowCustomFields
@@ -53,6 +53,11 @@
% while ( my $CustomField = $CustomFields->Next ) {
<%perl>
my $Values = $Object->CustomFieldValues( $CustomField->Id );
+
+$m->callback( CallbackName => 'AfterValues', CustomField => $CustomField,
+ Object => $Object, Grouping => $Grouping, Table => $Table,
+ Values => $Values, ARGSRef => \%ARGS);
+
my $count = $Values->Count;
next if $HideEmpty and not $count;
my $CustomFieldName = $CustomField->Name;
-----------------------------------------------------------------------
hooks/post-receive
--
rt
More information about the rt-commit
mailing list