[rt-devel] Using MessageId field in Attachments table

wkelleher at aaservicesltd.com wkelleher at aaservicesltd.com
Tue Feb 19 07:14:38 EST 2002


I was working on something similar to interface our system to another ticket
system. I assume that the other system will destroy the subject line and
replace it with its own (although it shouldn't) when it creates a new ticket
based on our ticket. I looked at enhanced-mailgate and took some code from
there (ParseMessageForCommands) and modified it to look for [rtname # and
when it finds it it returns the line to send to ParseticketId   Basically if
a ticket ID is not found in the subject the system will search the message
content for an ID. I still need to work on it some more to save the new ID
somewhere maybe create a new ticket and put the information I need in the
body of that one in a certain format.

> -----Original Message-----
> From: Eric Berggren [mailto:ericb at fpt.fujitsu.com]
> Sent: Monday, February 18, 2002 8:04 PM
> To: rt-devel at lists.fsck.com
> Subject: [rt-devel] Using MessageId field in Attachments table
> 
> 
> 
> This was hinted at by Bruce Campbell, and something that I've enjoyed
> with in-house ticket systems, whereby the system can track 
> e-mail articles
> by Message-Id, upon failing locating a suitable Subject: or 
> pseudo-header
> RT- tag.  It's another way to stem having to roll tickets together and
> such whenever the Subject: line gets munged or a new one 
> created.  Some
> mailers (Outlook) apparently don't do In-Reply-To: or 
> preserve other headers,
> and the same users who compose new e-mails rather than reply 
> will still leave
> one with the same issues, but this was something I was 
> willing to look into
> in my spare time.
> 
> As been pointed out, and observed myself, the MessageId field in the
> Attachments table is available but currently unused. Am I correct in
> assuming this is to eventually hold the id of incoming/outgoing
> attachments/articles ?
> 
> For starters, I would add the following code segments into 
> Attachment.pm :
> 
>         my $MessageId = $Attachment->head->get('message-id',0);
>         defined($MessageId) or $MessageId = '';
>         chomp($MessageId);
> 
>         $id = $self->SUPER::Create(TransactionId => 
> $args{'TransactionId'},
>                                    .....
>                                    MessageId => $MessageId,
>                                    Headers => 
> $Attachment->head->as_string,
>                                    Subject => $Subject,
>                                    .....
>                                   );
> 
> Then update  ParseTicketId()  called by rt-mailgate to include the
> In-Reply-To:  field to search on in the event the Subject: 
> header isn't
> revealing. Any linking or combining functions would still work,
> however, there doesn't appear to be any linkage from the attachments
> back to the ticket. What associates these together ? A 
> subsequent search
> through that table looking for the particular attachment is needed to
> get the TicketId.
> 
> Seems pretty straight-forward. Is there a catch buried in any 
> of this ?
> Was someone else working on this or been discussed previously ?
> 
> 
> thanks,
> -eric
> --
> Fujitsu Processor Technologies, Inc.
>  (Lawrence System Integration, Inc.)
> 
> 
> _______________________________________________
> rt-devel mailing list
> rt-devel at lists.fsck.com
> http://lists.fsck.com/mailman/listinfo/rt-devel
> 




More information about the Rt-devel mailing list