[rt-users] Ugly hack that does one step resolve on reply (w/ context of original requestor's message)

Steve Seremeth steve at eons.com
Wed Apr 23 13:33:09 EDT 2008


Hello -

I'm sure there are better ways of handling this, but after going back 
and forth a lot with how this should be implemented (and not being very 
familiar with the underlying codebase), I chose low-hanging fruit -- an 
ugly hack. 

A group within our organization that wants to use RT has a workflow that 
is almost always - respond and close a ticket.  Unfortunately, the 
"Resolve" link in the ticket header doesn't meet the need, because they 
want to include the user's context in the reply.  So, I changed the 
transaction reply link (the link that says reply just above the body of 
the requestor's message) to include the necessary bits to get the Update 
page to change the status to "resolved" for the impending reply.

Works in RT 3.6.6.  If someone wants to bash my implementation _and_ 
provide the proper local change (I don't care if it changes the status 
on the update page for responses directly or, say, adds a link to the 
ticket page that says "Reply and Resolve" - whatever), be my guest.  But 
I suspect there are other people who want this workflow and are capable 
of making this manual patch... so here it is:

diff -Naur old/Elements/ShowTransaction new/Elements/ShowTransaction
--- old/Elements/ShowTransaction        2008-04-23 13:06:09.000000000 -0400
+++ new/Elements/ShowTransaction        2008-04-23 10:38:16.000000000 -0400
@@ -173,6 +173,7 @@
             $titlebar_commands .=
                 "[<a href=\"".$UpdatePath."?id="
               . $Transaction->Ticket
+              . "&DefaultStatus=resolved"
               . "&QuoteTransaction="
               . $Transaction->Id
               . "&Action=Respond\">"

To install:

write the contents of the patch above to a file, say 
/tmp/ShowTransaction.patch
cd /my/path/to/rt/share/html/Ticket/Elements
patch -p2 </tmp/ShowTransaction.patch

WARNING: any upgrade will undoubtedly overwrite this change and you will 
undoubtedly have to repeat the process or do something different 
altogether after the upgrade!

Hope this helps someone.

Regards,

Steve




More information about the rt-users mailing list