[rt-users] Messages are quoted including comments

Phil Homewood pdh at snapgear.com
Sun Jan 5 18:33:02 EST 2003


Seth Cohn, EFN General Manager wrote:
> The lines are in Ticket/Elements/ShowTransactions, just remove the 
> "&QuoteTransaction=".$Transaction->Id. 
> part of the reply/comment sections.

Actually, this is a very neat idea, if extended just a tad.

The attached patch removes the quotation on replies,
where the transaction being replied to is a comment
(more accurately, if it's neither a create nor correspond.)
-- 
Phil Homewood, Systems Janitor, www.SnapGear.com
pdh at snapgear.com Ph: +61 7 3435 2810 Fx: +61 7 3891 3630
SnapGear - Custom Embedded Solutions and Security Appliances
-------------- next part --------------
Index: webrt/Ticket/Elements/ShowTransaction
===================================================================
RCS file: /cvs/local/rt/webrt/Ticket/Elements/ShowTransaction,v
retrieving revision 1.2
diff -u -r1.2 ShowTransaction
--- webrt/Ticket/Elements/ShowTransaction	13 Sep 2002 01:45:42 -0000	1.2
+++ webrt/Ticket/Elements/ShowTransaction	5 Jan 2003 23:27:24 -0000
@@ -146,10 +146,13 @@
 # If the transaction has anything attached to it at all
 if ($Transaction->Message->First && $ShowTitleBarCommands) {
 	if ($Transaction->TicketObj->CurrentUserHasRight('ReplyToTicket')) {
-		$titlebar_commands .= 
-	  	  "[<a href=\"Update.html?id=".
-		  $Transaction->Ticket . "&QuoteTransaction=".$Transaction->Id.
-		  "&Action=Respond\">Reply</a>] ";
+		$titlebar_commands .= "[<a href=\"Update.html?id=";
+		$titlebar_commands .= $Transaction->Ticket;
+		if ($Transaction->Type =~ /^(Create|Correspond)$/) {
+			$titlebar_commands .= 
+				"&QuoteTransaction=".$Transaction->Id;
+		}
+		$titlebar_commands .= "&Action=Respond\">Reply</a>] ";
 	}
 	if ($Transaction->TicketObj->CurrentUserHasRight('CommentOnTicket')) {
 	     $titlebar_commands .= 


More information about the rt-users mailing list