Edit TransactionCustomFields in Update.html

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’);

<% $CF->Name %>: <& /Elements/EditCustomField, CustomField => $CF, NamePrefix => "Object-RT::Transaction--CustomField-" &><% $CF->FriendlyType %> % } # 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

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’);

<% $CF->Name %>: <& /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émi2008/12/11 Rémi mirebob@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’);

<% $CF->Name %>: <& /Elements/EditCustomField, CustomField => $CF, NamePrefix => "Object-RT::Transaction--CustomField-" &><% $CF->FriendlyType %> % } # 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

Thanks Rémi

I’ve forwarded this into rt-bugs so we can have a look at it for 3.8.3

-kevinOn Jan 8, 2009, at 9:40 AM, Rémi wrote:

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’);

<% $CF->Name %>: <& /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@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’);

<% $CF->Name %>: <& /Elements/EditCustomField, CustomField => $CF, NamePrefix => "Object-RT::Transaction--CustomField-" &><% $CF- >FriendlyType %> % } # 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


List info: http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-devel