Custom Fields when Replying/Commenting

I’d like have the custom fields viewable when a ticket is
commented/replied to. I see in the Update.html code below that there is
an if statement that would appear to allow it to be displayed. I’m just
not sure how to get the if statement to trigger properly.

% if (my $TxnCFs = $TicketObj->TransactionCustomFields) {
% while (my $CF = $TxnCFs->Next()) {

<% $CF->Name %>: <& /Elements/EditCustomField, CustomField => $CF, NamePrefix => "Object-RT::Transaction--CustomField-" &><% $CF->FriendlyType %> % } # end if while % } # end of if