%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
%# <sales@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<% $QueueObj->Name %>
+<% $value %>
<%ARGS>
+$Ticket => undef
$QueueObj
</%ARGS>
<%INIT>
my $value = $QueueObj->Name;
+
+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');
+}
+
$value = '#'. $QueueObj->id
unless defined $value && length $value;
</%INIT>