[rt-devel] [PATCH] Reduce Clutter

Darrin Thompson darrint at progeny.com
Fri Feb 13 17:54:39 EST 2004


This makes a BIG difference. It really helps the user see the data that 
matters.

* De-clutterify the details of a ticket by erasing irrelevent data
   like "Not set" for unset fields.

See attached.

--
Darrin



-------------- next part --------------
Index: share/html/Ticket/Elements/ShowDates
===================================================================
--- share/html/Ticket/Elements/ShowDates	(revision 14573)
+++ share/html/Ticket/Elements/ShowDates	(revision 14574)
@@ -28,23 +28,43 @@
   </TR>
   <TR>
     <TD class="label"><&|/l&>Starts</&>:</TD>
-    <TD class="value"><% $Ticket->StartsObj->AsString %></TD>
+    <TD class="value">
+% if($Ticket->StartsObj->AsString ne 'Not set'){
+    <% $Ticket->StartsObj->AsString %>
+% }
+    </TD>
   </TR>
   <TR>
     <TD class="label"><&|/l&>Started</&>:</TD>
-    <TD class="value"><% $Ticket->StartedObj->AsString %></TD>
+    <TD class="value">
+% if($Ticket->StartedObj->AsString ne 'Not set'){    
+    <% $Ticket->StartedObj->AsString %>
+% }    
+    </TD>
   </TR>
   <TR>
     <TD class="label"><&|/l&>Last Contact</&>:</TD>
-    <TD class="value"><% $Ticket->ToldObj->AsString %></TD>
+    <TD class="value">
+% if($Ticket->ToldObj->AsString ne 'Not set'){    
+    <% $Ticket->ToldObj->AsString %>
+% }    
+    </TD>
   </TR>
   <TR>
     <TD class="label"><&|/l&>Due</&>:</TD>
-    <TD class="value"><% $Ticket->DueObj->AsString  %></TD>
+    <TD class="value">
+% if($Ticket->DueObj->AsString ne 'Not set'){    
+    <% $Ticket->DueObj->AsString  %>
+% }    
+    </TD>
   </TR>
   <TR>
     <TD class="label"><&|/l&>Closed</&>:</TD>
-    <TD class="value"><% $Ticket->ResolvedObj->AsString  %></TD>
+    <TD class="value">
+% if($Ticket->ResolvedObj->AsString ne 'Not set'){    
+    <% $Ticket->ResolvedObj->AsString  %>
+% }    
+    </TD>
   </TR>
   <TR>
     <TD class="label"><&|/l&>Updated</&>:</TD>
Index: share/html/Ticket/Elements/ShowBasics
===================================================================
--- share/html/Ticket/Elements/ShowBasics	(revision 14573)
+++ share/html/Ticket/Elements/ShowBasics	(revision 14574)
@@ -32,11 +32,19 @@
   </tr>
   <tr>
     <td class="label"><&|/l&>Worked</&>:</td>
-    <td class="value"><&|/l, $TimeWorked &>[_1] min</&></td>
+    <td class="value">
+% if($TimeWorked ne '0'){
+    <&|/l, $TimeWorked &>[_1] min</&>
+% }  
+   </td>
   </tr>
   <tr>
     <td class="label"><&|/l&>Priority</&>:</td>
-    <td class="value"><%$Ticket->Priority%>/<%$Ticket->FinalPriority %></td>
+    <td class="value">
+% if($Ticket->Priority ne '0'){    
+    <%$Ticket->Priority%>/<%$Ticket->FinalPriority %>
+% }    
+    </td>
   </tr>
   <tr>
     <td class="label"><&|/l&>Queue</&>:</td>


More information about the Rt-devel mailing list