X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=rt%2Fshare%2Fhtml%2FTicket%2FElements%2FShowQueue;h=59e39b8d173532de235f5450f796765d5f1d2ac0;hp=2552255911b310f8bc8ff67833a45ed1264b008c;hb=de9d037528895f7151a9aead6724ce2df95f9586;hpb=43a06151e47d2c59b833cbd8c26d97865ee850b6 diff --git a/rt/share/html/Ticket/Elements/ShowQueue b/rt/share/html/Ticket/Elements/ShowQueue index 255225591..59e39b8d1 100644 --- a/rt/share/html/Ticket/Elements/ShowQueue +++ b/rt/share/html/Ticket/Elements/ShowQueue @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2017 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -45,18 +45,28 @@ %# those contributions and any derivatives thereof. %# %# END BPS TAGGED BLOCK }}} +% if ( $query ) { +<% $value %> +% } else { <% $value %> +% } <%ARGS> $Ticket => undef $QueueObj <%INIT> my $value = $QueueObj->Name; +my $query; if ( $Ticket and $Ticket->CurrentUserHasRight('SeeQueue') ) { # Grab the queue name anyway if the current user can # see the queue based on his role for this ticket $value = $QueueObj->__Value('Name'); + if ( $session{CurrentUser}->Privileged ) { + my @statuses = $QueueObj->ActiveStatusArray(); + s{(['\\])}{\\$1}g for @statuses; + $query = "Queue = " . $QueueObj->id . " AND ( ". join(" OR ", map {"Status = '$_'"} @statuses) . " )"; + } } $value = '#'. $QueueObj->id