[rt-devel] Callbacks - Hiding custom fields

Martin Wheldon martin.wheldon at greenhills-it.co.uk
Thu May 2 05:47:47 EDT 2013


Hi,

I can iterate over the customfields with the following code:

while ( my $customfield = $CustomFields->Next()) {
     RT::Logger->info("CF = " . $customfield->Name . " " . 
$customfield->Disabled);
}

And get the information about the customfield find, I can even set the 
a customfield to disabled
however I'm unsure on how to mask a CF from the page?

Googling throws up the following extension:
https://github.com/bestpractical/rt-extension-customfield-hideemptyvalues/blob/master/html/Callbacks/CustomField-HideEmptyValues/Elements/ShowCustomFields/MassageCustomFields

But looking at the documentation Limit no longer exists.

Is it as simple as removing the customfield from the $CustomFields 
object?

Best Regards

Martin

On 2013-05-01 19:39, Martin Wheldon wrote:
> Hi,
>
> I've added a new item to the RT ticket menu bar along with the
> relevant page when you click the link so
> the menu bar looks as follows:
>
> Display History Basics Outcome People ...
>
> This all works fine, the new Outcome page is based on the Modify.html
> in which there is a callback
>
> # Now let callbacks have a chance at editing %ARGS
> $m->callback( TicketObj => $TicketObj, CustomFields => $CustomFields,
> ARGSRef => \%ARGS );
>
> I have written a boiler plate callback which is being called, however
> my question is how do I massage the
> customfields in the callback to hide some of them from the user?
>
> I'm using RT 4.0.11 by the way.
>
> Best Regards



More information about the rt-devel mailing list