X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=rt%2Fshare%2Fhtml%2FTicket%2FElements%2FShowQueue;h=3cc295780253af14c1af0eefc106baf1bf960aa9;hb=44dd00a3ff974a17999e86e64488e996edc71e3c;hp=118108f6dfd52b8f0d4ea5650b09d374a79c285c;hpb=3d0a1bb06b895c5be6e3f0517d355442a6b1e125;p=freeside.git diff --git a/rt/share/html/Ticket/Elements/ShowQueue b/rt/share/html/Ticket/Elements/ShowQueue index 118108f6d..3cc295780 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-2013 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2019 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