<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://rt-wiki.bestpractical.com/index.php?action=history&amp;feed=atom&amp;title=RichardF</id>
	<title>RichardF - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://rt-wiki.bestpractical.com/index.php?action=history&amp;feed=atom&amp;title=RichardF"/>
	<link rel="alternate" type="text/html" href="https://rt-wiki.bestpractical.com/index.php?title=RichardF&amp;action=history"/>
	<updated>2026-08-22T13:20:05Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.41.1</generator>
	<entry>
		<id>https://rt-wiki.bestpractical.com/index.php?title=RichardF&amp;diff=3192&amp;oldid=prev</id>
		<title>Admin: 2 revisions imported</title>
		<link rel="alternate" type="text/html" href="https://rt-wiki.bestpractical.com/index.php?title=RichardF&amp;diff=3192&amp;oldid=prev"/>
		<updated>2016-04-06T20:36:17Z</updated>

		<summary type="html">&lt;p&gt;2 revisions imported&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;We are trialling RT (currently v3.6.4) to help us manage job requests from our clients.&lt;br /&gt;
&lt;br /&gt;
To make user management easier, all users are privileged (so the all show up in the user list without needing to search on %), but our logins related to our clients are &amp;quot;semi-privileged&amp;quot; in that they are being limited to the [[SelfService]] interface only via the autohandler modification mentioned on the [[AutoRedirectToSelfService]] page (ie clients don&amp;#039;t have the [[OwnTicket]] right, but all staff do).&lt;br /&gt;
&lt;br /&gt;
Each client has its own group and queue, and all logins for the client are only given access the their queue, with [[CreateTicket]], [[SeeQueue]], [[ShowTicket]] &amp;amp;amp; [[ReplyTicket]] privileges only. The client users also are given [[ModifySelf]] privilege so they can change their password.&lt;br /&gt;
&lt;br /&gt;
We have also modified the [[SelfService]] interface so that the Open Tickets and Closed Tickets pages show both the tickets that the particular user has created, plus a list of all of the tickets created by all logins for that client (ie all tickets in all the queues that particular user has [[ShowTicket]] rights on, which is only the queue for all tickets related to that client).&lt;br /&gt;
&lt;br /&gt;
To achieve this, the following modification (admittedly not very elegant!) was made to html/[[SelfService]]/Elements/[[MyRequests]] (we also added a few formatting and sorting changes to the default template too):&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&amp;amp;lt;&amp;amp;amp;| /Widgets/TitleBox, title =&amp;amp;gt;  $title &amp;amp;amp;&amp;amp;gt;&lt;br /&gt;
 &amp;amp;lt;&amp;amp;amp; /Elements/TicketList, Title   =&amp;amp;gt; $title,&lt;br /&gt;
                         Format  =&amp;amp;gt; @Format,&lt;br /&gt;
                         Query   =&amp;amp;gt; $Query,&lt;br /&gt;
                         Order   =&amp;amp;gt; $Order,&lt;br /&gt;
                          OrderBy =&amp;amp;gt; $OrderBy,&lt;br /&gt;
                         BaseURL =&amp;amp;gt; $BaseURL,&lt;br /&gt;
                         Page    =&amp;amp;gt; $Page &amp;amp;amp;&amp;amp;gt;&lt;br /&gt;
 &amp;amp;lt;/&amp;amp;amp;&amp;amp;gt;&lt;br /&gt;
 &amp;amp;lt;&amp;amp;amp;| /Widgets/TitleBox, title =&amp;amp;gt;  $gtitle &amp;amp;amp;&amp;amp;gt;&lt;br /&gt;
 &amp;amp;lt;&amp;amp;amp; /Elements/TicketList, Title   =&amp;amp;gt; $gtitle,&lt;br /&gt;
                         Format  =&amp;amp;gt; @GFormat,&lt;br /&gt;
                         Query   =&amp;amp;gt; $GQuery,&lt;br /&gt;
                         Order   =&amp;amp;gt; $Order,&lt;br /&gt;
                         OrderBy =&amp;amp;gt; $OrderBy,&lt;br /&gt;
                         BaseURL =&amp;amp;gt; $BaseURL,&lt;br /&gt;
                         Page    =&amp;amp;gt; $Page &amp;amp;amp;&amp;amp;gt;&lt;br /&gt;
 &amp;amp;lt;/&amp;amp;amp;&amp;amp;gt;&lt;br /&gt;
 &amp;amp;lt;%INIT&amp;amp;gt;&lt;br /&gt;
 my $id = $session{&amp;#039;CurrentUser&amp;#039;}-&amp;amp;gt;id;&lt;br /&gt;
 &lt;br /&gt;
 # Determine queues this user can see&lt;br /&gt;
 my $Queues = RT::Queues-&amp;amp;gt;new($session{&amp;#039;CurrentUser&amp;#039;});&lt;br /&gt;
 $Queues-&amp;amp;gt;UnLimit();&lt;br /&gt;
 &lt;br /&gt;
 my $Query = &amp;quot;( &amp;quot;&lt;br /&gt;
    . join( &amp;#039; OR &amp;#039;, map &amp;quot;$_.id = $id&amp;quot;, @roles )&lt;br /&gt;
    . &amp;quot;)&amp;quot;;&lt;br /&gt;
 my $GQuery = &amp;quot;( &amp;quot;;&lt;br /&gt;
 my $queueCount = 0;&lt;br /&gt;
 while (my $queue = $Queues-&amp;amp;gt;Next) {&lt;br /&gt;
   if ($queue-&amp;amp;gt;CurrentUserHasRight(&amp;#039;ShowTicket&amp;#039;))&lt;br /&gt;
   {&lt;br /&gt;
      if ($queueCount &amp;amp;gt; 0)&lt;br /&gt;
      {&lt;br /&gt;
        $GQuery .= &amp;#039; OR &amp;#039;;&lt;br /&gt;
      }&lt;br /&gt;
      $queueCount++;&lt;br /&gt;
      $GQuery .= &amp;quot;Queue = &amp;#039;&amp;quot; . $queue -&amp;amp;gt; Name . &amp;quot;&amp;#039;&amp;quot;;&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
 # handle users with no queues&lt;br /&gt;
 if ($queueCount == 0)&lt;br /&gt;
 {&lt;br /&gt;
   $GQuery .= &amp;quot;1=1&amp;quot;;&lt;br /&gt;
 }&lt;br /&gt;
 $GQuery .= &amp;quot;)&amp;quot;;&lt;br /&gt;
 &lt;br /&gt;
 if ( @status ) {&lt;br /&gt;
   my $sQuery = &amp;quot; AND ( &amp;quot;&lt;br /&gt;
        . join( &amp;#039; OR &amp;#039;, map &amp;quot;Status = &amp;#039;$_&amp;#039;&amp;quot;, @status )&lt;br /&gt;
        . &amp;quot; )&amp;quot;;&lt;br /&gt;
   $Query .= $sQuery;&lt;br /&gt;
   $GQuery .= $sQuery;&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 #my $Order = &amp;quot;ASC&amp;quot;;&lt;br /&gt;
 #my $OrderBy = &amp;quot;Created&amp;quot;;&lt;br /&gt;
 &lt;br /&gt;
 # Order by priority - highest to lowest&lt;br /&gt;
 my $Order = &amp;quot;DESC&amp;quot;;&lt;br /&gt;
 my $OrderBy = &amp;quot;Priority&amp;quot;;&lt;br /&gt;
 &lt;br /&gt;
 my @Format = qq{&lt;br /&gt;
   &amp;#039;&amp;amp;lt;B&amp;amp;gt;&amp;amp;lt;A HREF=&amp;quot;$RT::WebPath/SelfService/Display.html?id=__id__&amp;quot;&amp;amp;gt;__id__&amp;amp;lt;/a&amp;amp;gt;&amp;amp;lt;/B&amp;amp;gt;/TITLE:#/ALIGN:center&amp;#039;,&lt;br /&gt;
   &amp;#039;&amp;amp;lt;B&amp;amp;gt;&amp;amp;lt;A HREF=&amp;quot;$RT::WebPath/SelfService/Display.html?id=__id__&amp;quot;&amp;amp;gt;__Subject__&amp;amp;lt;/a&amp;amp;gt;&amp;amp;lt;/B&amp;amp;gt;/TITLE:Subject&amp;#039;,&lt;br /&gt;
   &amp;#039;__Status__/ALIGN:center&amp;#039;,&lt;br /&gt;
   &amp;#039;__Priority__/ALIGN:center&amp;#039;&lt;br /&gt;
 };&lt;br /&gt;
 &lt;br /&gt;
 my @GFormat = qq{&lt;br /&gt;
    &amp;#039;&amp;amp;lt;B&amp;amp;gt;&amp;amp;lt;A HREF=&amp;quot;$RT::WebPath/SelfService/Display.html?id=__id__&amp;quot;&amp;amp;gt;__id__&amp;amp;lt;/a&amp;amp;gt;&amp;amp;lt;/B&amp;amp;gt;/TITLE:#&amp;#039;,&lt;br /&gt;
    &amp;#039;&amp;amp;lt;B&amp;amp;gt;&amp;amp;lt;A HREF=&amp;quot;$RT::WebPath/SelfService/Display.html?id=__id__&amp;quot;&amp;amp;gt;__Subject__&amp;amp;lt;/a&amp;amp;gt;&amp;amp;lt;/B&amp;amp;gt;/TITLE:Subject&amp;#039;,&lt;br /&gt;
   &amp;#039;__CreatedBy__/ALIGN:center&amp;#039;,&lt;br /&gt;
   &amp;#039;__Status__/ALIGN:center&amp;#039;,&lt;br /&gt;
   &amp;#039;__Priority__/ALIGN:center&amp;#039;,&lt;br /&gt;
   &amp;#039;__QueueName__/ALIGN:center&amp;#039;&lt;br /&gt;
 };&lt;br /&gt;
 &amp;amp;lt;/%INIT&amp;amp;gt;&lt;br /&gt;
 &amp;amp;lt;%ARGS&amp;amp;gt;&lt;br /&gt;
 $friendly_status =&amp;amp;gt; loc(&amp;#039;open&amp;#039;)&lt;br /&gt;
 $title =&amp;amp;gt; loc(&amp;quot;My [_1] tickets&amp;quot;, $friendly_status)&lt;br /&gt;
 $gtitle =&amp;amp;gt; &amp;quot;All &amp;quot; . $friendly_status . &amp;quot; tickets for my company&amp;quot;&lt;br /&gt;
 @roles =&amp;amp;gt; (&amp;#039;Watcher&amp;#039;)&lt;br /&gt;
 @status =&amp;amp;gt; (&amp;#039;open&amp;#039;, &amp;#039;new&amp;#039;, &amp;#039;stalled&amp;#039;)&lt;br /&gt;
 $BaseURL =&amp;amp;gt; undef&lt;br /&gt;
 $Page =&amp;amp;gt; 1&lt;br /&gt;
 &amp;amp;lt;/%ARGS&amp;amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;/nowiki&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
</feed>