Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Request Tracker: Devel

Edit TransactionCustomFields in Update.html

 

 

Request Tracker devel RSS feed   Index | Next | Previous | View Threaded


mirebob at gmail

Dec 11, 2008, 6:29 AM

Post #1 of 3 (1031 views)
Permalink
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');*
<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


mirebob at gmail

Jan 8, 2009, 6:40 AM

Post #2 of 3 (842 views)
Permalink
Re: Edit TransactionCustomFields in Update.html [In reply to]

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>

> 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
>


falcone at bestpractical

Jan 8, 2009, 7:39 AM

Post #3 of 3 (832 views)
Permalink
Re: Edit TransactionCustomFields in Update.html [In reply to]

Thanks Rémi

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

-kevin
On 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');
> <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>
> 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
>
> _______________________________________________
> List info: http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-devel

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

Request Tracker devel RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.