[rt-devel] Re: Some HTML goodies (QuickSearch and EditLinks)

Andrew Stribblehill a.d.stribblehill at durham.ac.uk
Fri Nov 28 05:15:05 EST 2003


Quoting Andrew Stribblehill <a.d.stribblehill at durham.ac.uk> (2003-11-26 15:29:10 GMT):
> The attached diffs between RT 3.0.7_1 and my local modifications may
> be generally of use.
> 
> * Change the front-page right-hand-side list of queues to also show
>   stalled tickets. (The '+' link shows New+Open; clicking on the
>   queue itself shows New+Open+Stalled. Trust me, it's obvious!)
> 
> * Allow the Relationships page of a ticket to create new tickets for
>   the dependencies show. You can make a new ticket which depends on
>   the present one just by clicking on '(new)' to the right of
>   'Depended on by', for example.
> 
> To install, copy the distribution's files
> (html/Ticket/Elements/EditLinks and html/Elements/Quicksearch) to
> your local HTML tree then apply the patch to the local tree.
> 
> Jesse: I think that the latter feature would be excellent added to RT
> itself, making it much more suitable for project management. What do
> you think?

*blush* Attaches files...

-- 
IRISH SEA
SOUTHWESTERLY BACKING SOUTHEASTERLY 4 OR 5, INCREASING 6 OR 7.
SHOWERS THEN RAIN. GOOD BECOMING MODERATE
-------------- next part --------------
diff -aur /usr/share/request-tracker3/html/Elements/Quicksearch ./Elements/Quicksearch
--- /usr/share/request-tracker3/html/Elements/Quicksearch	2003-11-18 03:54:06.000000000 +0000
+++ ./Elements/Quicksearch	2003-11-13 16:36:13.000000000 +0000
@@ -27,7 +27,9 @@
 <tr>                                                                          
        <th align=left><&|/l&>Queue</&></th>                                         
        <th align=right><font size=-1><&|/l&>New</&></font></th>
+       <th />
        <th align=right><font size=-1><&|/l&>Open</&></font></th>          
+       <th align=right><font size=-1><&|/l&>Stalled</&></font></th>
 </tr>
 
 <%PERL>
@@ -43,12 +45,19 @@
      $Tickets->LimitQueue(VALUE => $queue->Name, OPERATOR => '=');            
      my $new = $Tickets->Count();
 
+     $Tickets->ClearRestrictions;                                           
+     $Tickets->LimitStatus(VALUE => "stalled");
+     $Tickets->LimitQueue(VALUE => $queue->Name, OPERATOR => '=');            
+     my $stalled = $Tickets->Count();
+
 </%PERL>
 % $i++;                                                                         
 <TR class="<% $i%2 ? 'oddline' : 'evenline'%>" >                                
-<td><A HREF="<% $RT::WebPath%>/Search/Listing.html?ValueOfStatus=open&ValueOfStatus=new&StatusOp=%3D&QueueOp=%3D&ValueOfQueue=<%$queue->Id%>&RowsPerPage=50&NewSearch=1" TITLE="<% $queue->Description %>"><%$queue->Name%></a></TD>
-<td align="right"><A HREF="<% $RT::WebPath%>/Search/Listing.html?ValueOfStatus=new&StatusOp=%3D&QueueOp=%3D&ValueOfQueue=<%$queue->Id%>&RowsPerPage=50&NewSearch=1"><%$new%></a></TD>
-<td align="right"><A HREF="<% $RT::WebPath%>/Search/Listing.html?ValueOfStatus=open&StatusOp=%3D&QueueOp=%3D&ValueOfQueue=<%$queue->Id%>&RowsPerPage=50&NewSearch=1"><%$open%></a></TD>
+<td><A HREF="<% $RT::WebPath%>/Search/Listing.html?ValueOfStatus=open&ValueOfStatus=new&ValueOfStatus=stalled&StatusOp=%3D&QueueOp=%3D&ValueOfQueue=<%$queue->Id%>&RowsPerPage=50&NewSearch=1" TITLE="<% $queue->Description %>"><%$queue->Name%></a></TD>
+<td align="center"><A HREF="<% $RT::WebPath%>/Search/Listing.html?ValueOfStatus=new&StatusOp=%3D&QueueOp=%3D&ValueOfQueue=<%$queue->Id%>&RowsPerPage=50&NewSearch=1"><%$new%></a></TD>
+<td align="center"><A HREF="<% $RT::WebPath%>/Search/Listing.html?ValueOfStatus=open&ValueOfStatus=new&StatusOp=%3D&QueueOp=%3D&ValueOfQueue=<%$queue->Id%>&RowsPerPage=50&NewSearch=1">+</a></TD>
+<td align="center"><A HREF="<% $RT::WebPath%>/Search/Listing.html?ValueOfStatus=open&StatusOp=%3D&QueueOp=%3D&ValueOfQueue=<%$queue->Id%>&RowsPerPage=50&NewSearch=1"><%$open%></a></TD>
+<td align="right"><A HREF="<% $RT::WebPath%>/Search/Listing.html?ValueOfStatus=stalled&StatusOp=%3D&QueueOp=%3D&ValueOfQueue=<%$queue->Id%>&RowsPerPage=50&NewSearch=1"><%$stalled%></a></TD>
 </TR>
 % }
 </TABLE>
diff -aur /usr/share/request-tracker3/html/Ticket/Elements/EditLinks ./Ticket/Elements/EditLinks
--- /usr/share/request-tracker3/html/Ticket/Elements/EditLinks	2003-11-18 03:54:07.000000000 +0000
+++ ./Ticket/Elements/EditLinks	2003-11-26 14:59:57.000000000 +0000
@@ -99,27 +99,33 @@
   </TR>
   <TR>
     <TD class="label"><&|/l&>Depends on</&>:</TD>
-    <TD class="entry"><input name="<%$Ticket->Id%>-DependsOn"></TD>
+    <TD class="entry"><input name="<%$Ticket->Id%>-DependsOn">
+    <a href="Create.html?DependsOn-new=<%$Ticket->Id%>&Queue=<%$Ticket->Queue%>">(new)</a></TD>
   </TR>
   <TR>
     <TD class="label"><&|/l&>Depended on by</&>:</TD>
-    <TD class="entry"><input name="DependsOn-<%$Ticket->Id%>"></TD>
+    <TD class="entry"><input name="DependsOn-<%$Ticket->Id%>">
+    <a href="Create.html?new-DependsOn=<%$Ticket->Id%>&Queue=<%$Ticket->Queue%>">(new)</a></TD>
   </TR>
   <TR>
     <TD class="label"><&|/l&>Parents</&>:</TD>
-    <TD class="entry"><input name="<%$Ticket->Id%>-MemberOf"></TD>
+    <TD class="entry"><input name="<%$Ticket->Id%>-MemberOf">
+    <a href="Create.html?MemberOf-new=<%$Ticket->Id%>&Queue=<%$Ticket->Queue%>">(new)</a></TD>
   </TR>
   <TR>
     <TD class="label"><&|/l&>Children</&>:</TD>
-    <TD class="entry"> <input name="MemberOf-<%$Ticket->Id%>"></TD>
+    <TD class="entry"> <input name="MemberOf-<%$Ticket->Id%>">
+    <a href="Create.html?new-MemberOf=<%$Ticket->Id%>&Queue=<%$Ticket->Queue%>">(new)</a></TD>
   </TR>
   <TR>
     <TD class="label"><&|/l&>Refers to</&>:</TD>
-    <TD class="entry"><input name="<%$Ticket->Id%>-RefersTo"></TD>
+    <TD class="entry"><input name="<%$Ticket->Id%>-RefersTo">
+    <a href="Create.html?RefersTo-new=<%$Ticket->Id%>&Queue=<%$Ticket->Queue%>">(new)</a></TD>
   </TR>
   <TR>
     <TD class="label"><&|/l&>Referred to by</&>:</TD>
-    <TD class="entry"> <input name="RefersTo-<%$Ticket->Id%>"></TD>
+    <TD class="entry"> <input name="RefersTo-<%$Ticket->Id%>">
+    <a href="Create.html?new-RefersTo=<%$Ticket->Id%>&Queue=<%$Ticket->Queue%>">(new)</a></TD>
   </TR>
 </TABLE>
 </TD>


More information about the Rt-devel mailing list