Attachements in correspondence

How do I set up RT 2.0.7 to send attachments in correspondence? We often
reply to a ticket with an attachement of somekind (i.e testcase). This
attachment is not included in the email sent to the Requestor or to
other watchers. It is added to the database and I can see it in the
WebUI, however.

Is there some configuration I am missing, or do I have to rewrite the
templates?

Thanks,
/Staffan Larsen

You’ll need to rewrite RT::Action::Notify to do that.On Fri, Oct 05, 2001 at 05:27:53PM +0200, Staffan Larsen wrote:

How do I set up RT 2.0.7 to send attachments in correspondence? We often
reply to a ticket with an attachement of somekind (i.e testcase). This
attachment is not included in the email sent to the Requestor or to
other watchers. It is added to the database and I can see it in the
WebUI, however.

Is there some configuration I am missing, or do I have to rewrite the
templates?

Thanks,
/Staffan Larsen


rt-users mailing list
rt-users@lists.fsck.com
http://lists.fsck.com/mailman/listinfo/rt-users

http://www.bestpractical.com/products/rt – Trouble Ticketing. Free.

How do I set up RT 2.0.7 to send attachments in correspondence? We often
reply to a ticket with an attachement of somekind (i.e testcase). This
attachment is not included in the email sent to the Requestor or to
other watchers. It is added to the database and I can see it in the
WebUI, however.

Is there some configuration I am missing, or do I have to rewrite the
templates?

Thanks,
/Staffan Larsen

Looking in the archives, I see this message:

http://lists.fsck.com/pipermail/rt-users/2001-October/004648.html

In which Jesse says:

You’ll need to rewrite RT::Action::Notify to do that.On Fri, Oct 05, 2001 at 05:27:53PM +0200, Staffan Larsen wrote:

How do I set up RT 2.0.7 to send attachments in correspondence? We often
reply to a ticket with an attachement of somekind (i.e testcase). This
attachment is not included in the email sent to the Requestor or to

Now, with all due respect, WTF is the point of the Attach dialog box
in the reply form? If it doesn’t do what you expect, it should just
go away.

Vivek Khera, Ph.D. Khera Communications, Inc.
Internet: khera@kciLink.com Rockville, MD +1-240-453-8497
AIM: vivekkhera Y!: vivek_khera http://www.khera.org/~vivek/

Now, with all due respect, WTF is the point of the Attach dialog box
in the reply form? If it doesn’t do what you expect, it should just
go away.

It attaches it to the ticket. If you need the functionality, either implement
it, have me implement it, or pipe down.

http://www.bestpractical.com/products/rt – Trouble Ticketing. Free.

“JV” == Jesse Vincent jesse@bestpractical.com writes:

JV> On Wed, Oct 10, 2001 at 03:32:46PM -0400, Vivek Khera wrote:

Now, with all due respect, WTF is the point of the Attach dialog box
in the reply form? If it doesn’t do what you expect, it should just
go away.

JV> It attaches it to the ticket. If you need the functionality,
JV> either implement it, have me implement it, or pipe down.

Then I say it is in the wrong place. Where the dialog box is now
implies to me that it is part of the reply message. If it is not, it
should go someplace where you know you’re only updating the ticket,
like “Basics”. IMO, it is a bad UI decision to put it where it is now
unless it sends along with the message.

Obviously, at least one other person on this list seems to think it
would send the attachment with the response.

Anyhow, in the “put up or shut up” category, looking at
RT::Action::Notify, I see it ISA RT::Action::SendMessage. SendMessage
has a bunch of methods and it looks as if the Commit() method actually
pulls the parts together and creates the message. Am I on the right
track to override RT::Action::Notify::Commit() to put together the
appropriate MIME headers and attach the content from some parts of the
$self object? Not being a Mason hack, I’m not sure from where I’d
pull the CGI upload contents here.

Obviously, at least one other person on this list seems to think it
would send the attachment with the response.

nod We’ve actually had this one a few times before, too. This addition
would be useful for more than just web updates, but also to send out attachments
that come in as part of MIME encoded mail messages.

I want this behaviour as well, It’s just not high on my list. But I’d definitely
be happy to help you out making it go.

looking at RT::Action::Notify, I see it ISA RT::Action::SendMessage.
SendMessage has a bunch of methods and it looks as if the Commit() method
actually pulls the parts together and creates the message. Am I on the right
track to override RT::Action::Notify::Commit() to put together the
appropriate MIME headers and attach the content from some parts of the
$self object? Not being a Mason hack, I’m not sure from where I’d
pull the CGI upload contents here.

You’re right that Notify ISA SendMessage. You actually want to override
Prepare. (If Prepare succeeds, the scrips system calls Commit).

So, create NotifyWithAttachments.

set a sub Prepare that
calls SUPER::Prepare.

if that returns true, iterate through $self->TransactionObj->Attachments
and add them to $self->TemplateObj->MIMEObj.

(TransactionObj is an RT::Transaction object which already has all of
this transaction's attachments already attached.  MIMEObj is a
MIME::Entity.)

is that enough to get going?


rt-users mailing list
rt-users@lists.fsck.com
http://lists.fsck.com/mailman/listinfo/rt-users

http://www.bestpractical.com/products/rt – Trouble Ticketing. Free.

Thanks for getting me going, Jesse. Attached is an implementation of
your
ideas. My knowledge of RT in particular and Perl in general is not what
it should be so please take a look for any obvious errors. I have run
this sucessfully with RT 2.0.7.

Regards,
/Staffan Larsen

Jesse Vincent wrote:

Obviously, at least one other person on this list seems to think it
would send the attachment with the response.

nod We’ve actually had this one a few times before, too. This addition
would be useful for more than just web updates, but also to send out attachments
that come in as part of MIME encoded mail messages.

I want this behaviour as well, It’s just not high on my list. But I’d definitely
be happy to help you out making it go.

looking at RT::Action::Notify, I see it ISA RT::Action::SendMessage.
SendMessage has a bunch of methods and it looks as if the Commit() method
actually pulls the parts together and creates the message. Am I on the right
track to override RT::Action::Notify::Commit() to put together the
appropriate MIME headers and attach the content from some parts of the
$self object? Not being a Mason hack, I’m not sure from where I’d
pull the CGI upload contents here.

You’re right that Notify ISA SendMessage. You actually want to override
Prepare. (If Prepare succeeds, the scrips system calls Commit).

So, create NotifyWithAttachments.

set a sub Prepare that
calls SUPER::Prepare.

    if that returns true, iterate through $self->TransactionObj->Attachments
    and add them to $self->TemplateObj->MIMEObj.

    (TransactionObj is an RT::Transaction object which already has all of
    this transaction's attachments already attached.  MIMEObj is a
    MIME::Entity.)

is that enough to get going?


rt-users mailing list
rt-users@lists.fsck.com
http://lists.fsck.com/mailman/listinfo/rt-users


http://www.bestpractical.com/products/rt – Trouble Ticketing. Free.


rt-users mailing list
rt-users@lists.fsck.com
http://lists.fsck.com/mailman/listinfo/rt-users

Appeal Virtual Machines - Makers of JRockit
http://www.jrockit.com/

NotifyWithAttachment.pm (1.53 KB)

insert_action.pl (1.76 KB)