Mercurial > p > roundup > code
changeset 1604:f2bdf6b07c2a
email file attachments added to issue files list [SF#711501]
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Wed, 23 Apr 2003 12:10:51 +0000 |
| parents | a3442208867f |
| children | da7edcdd8500 |
| files | CHANGES.txt roundup/mailgw.py |
| diffstat | 2 files changed, 12 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/CHANGES.txt Wed Apr 23 11:59:36 2003 +0000 +++ b/CHANGES.txt Wed Apr 23 12:10:51 2003 +0000 @@ -96,6 +96,7 @@ - only look for CSV files when importing (thanks Dan Grassi) - can now unset values in CSV editing (sf bug 704788) - fixed rdbms email address lookup (case insensitivity) +- email file attachments added to issue files list (sf bug 711501) 2003-02-27 0.5.6
--- a/roundup/mailgw.py Wed Apr 23 11:59:36 2003 +0000 +++ b/roundup/mailgw.py Wed Apr 23 12:10:51 2003 +0000 @@ -73,7 +73,7 @@ an exception, the original message is bounced back to the sender with the explanatory message given in the exception. -$Id: mailgw.py,v 1.116 2003-04-17 06:51:44 richard Exp $ +$Id: mailgw.py,v 1.117 2003-04-23 12:09:20 richard Exp $ ''' import string, re, os, mimetools, cStringIO, smtplib, socket, binascii, quopri @@ -817,6 +817,16 @@ name = "unnamed" files.append(self.db.file.create(type=mime_type, name=name, content=data, **file_props)) + # attach the files to the issue + if nodeid: + # extend the existing files list + fileprop = cl.get(nodeid, 'file') + fileprop.extend(files) + props['files'] = fileprop + else: + # pre-load the files list + props['files'] = fileprop + # # create the message if there's a message body (content)
