[Rt-devel] Edit TransactionCustomFields in Update.html

Rémi mirebob at gmail.com
Thu Jan 8 09:40:23 EST 2009


hi all,
my first post was certainly not well formed

so in RT version 3.8.2,
in Ticket/Update.html , a form input is display for all Transaction CFs even
if the user doesn't have the right to modify it

here's the patch

--- html/Ticket/Update.html-orig        2009-01-08 15:09:28.000000000 +0100
+++ html/Ticket/Update.html     2008-12-11 15:12:02.000000000 +0100
@@ -100,6 +101,7 @@

 % if (my $TxnCFs = $TicketObj->TransactionCustomFields) {
 %    while (my $CF = $TxnCFs->Next()) {
+%              next unless $CF->CurrentUserHasRight('ModifyCustomField');
 <tr>
 <td class="label"><% $CF->Name %>:</td>
 <td><& /Elements/EditCustomField, CustomField => $CF, NamePrefix =>


I know it's just one line, but that really will cleanup the display of the
Update page for tickets with a lot of Transaction CFs,
and it is done like this for the other CFs
could it be integrated in the next release ?

Rémi


2008/12/11 Rémi <mirebob at gmail.com>

> hi rt-devels
>
> I've made a little patch for Ticket/Update.html to disable the display of
> TransactionCustomFields when a user doesn't have the right to modify it (so
> there si no need to diplay it!).
>
>
> % if (my $TxnCFs = $TicketObj->TransactionCustomFields) {
> %    while (my $CF = $TxnCFs->Next()) {
> *%        next unless $CF->CurrentUserHasRight('ModifyCustomField');*
> <tr>
> <td class="label"><% $CF->Name %>:</td>
> <td><& /Elements/EditCustomField, CustomField => $CF, NamePrefix =>
>     "Object-RT::Transaction--CustomField-" &><em><% $CF->FriendlyType
> %></em></td>
> </tr>
> %    } # end if while
> % } # end of if
>
>
> $ diff Update.html /usr/share/request-tracker3.8/html/Ticket/Update.html
> 103d102
> < %        next unless $CF->CurrentUserHasRight('ModifyCustomField');
>
>
> Rémi
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.bestpractical.com/pipermail/rt-devel/attachments/20090108/6910d2d7/attachment-0001.htm 


More information about the Rt-devel mailing list