[Rt-commit] rt branch, 4.2/doc-extractparseticketid, created. rt-4.2.3rc1-1-g7addb5f

Kevin Falcone falcone at bestpractical.com
Wed Feb 19 16:14:22 EST 2014


The branch, 4.2/doc-extractparseticketid has been created
        at  7addb5fbabc298fc4bf8565998d3c64b746826e1 (commit)

- Log -----------------------------------------------------------------
commit 7addb5fbabc298fc4bf8565998d3c64b746826e1
Author: Kevin Falcone <falcone at bestpractical.com>
Date:   Wed Feb 19 16:12:08 2014 -0500

    Document two methods that are useful for site-specific tweaks
    
    We implemented these functions in 139f5da1 to allow for clean extension
    overrides but didn't provide any docs for extension writers.

diff --git a/lib/RT/Interface/Email.pm b/lib/RT/Interface/Email.pm
index 7c1e126..facdb38 100644
--- a/lib/RT/Interface/Email.pm
+++ b/lib/RT/Interface/Email.pm
@@ -1078,6 +1078,19 @@ sub PseudoReference {
     return '<RT-Ticket-'. $ticket->id .'@'. RT->Config->Get('Organization') .'>';
 }
 
+=head2 ExtractTicketId
+
+Passed a MIME::Entity.  Returns a ticket id or undef to signal 'new ticket'.
+
+This is a great entry point if you need to customize how ticket ids are
+handled for your site. RT-Extension-RepliesToResolved demonstrates one
+possible use for this extension.
+
+If the Subject of this ticket is modified, it will be reloaded by the
+mail gateway code before Ticket creation.
+
+=cut
+
 sub ExtractTicketId {
     my $entity = shift;
 
@@ -1086,6 +1099,14 @@ sub ExtractTicketId {
     return ParseTicketId( $subject );
 }
 
+=head2 ParseTicketId
+
+Takes a string and searches for [subjecttag #id]
+
+Returns the id if a match is found.  Otherwise returns undef.
+
+=cut
+
 sub ParseTicketId {
     my $Subject = shift;
 

-----------------------------------------------------------------------


More information about the rt-commit mailing list