Skip to content

Commit 2a4907e

Browse files
author
Richard Jones
committed
email file attachments added to issue files list [SF#711501]
1 parent 2e75178 commit 2a4907e

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

CHANGES.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ Fixed:
9696
- only look for CSV files when importing (thanks Dan Grassi)
9797
- can now unset values in CSV editing (sf bug 704788)
9898
- fixed rdbms email address lookup (case insensitivity)
99+
- email file attachments added to issue files list (sf bug 711501)
99100

100101

101102
2003-02-27 0.5.6

roundup/mailgw.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ class node. Any parts of other types are each stored in separate files
7373
an exception, the original message is bounced back to the sender with the
7474
explanatory message given in the exception.
7575
76-
$Id: mailgw.py,v 1.116 2003-04-17 06:51:44 richard Exp $
76+
$Id: mailgw.py,v 1.117 2003-04-23 12:09:20 richard Exp $
7777
'''
7878

7979
import string, re, os, mimetools, cStringIO, smtplib, socket, binascii, quopri
@@ -817,6 +817,16 @@ def handle_message(self, message):
817817
name = "unnamed"
818818
files.append(self.db.file.create(type=mime_type, name=name,
819819
content=data, **file_props))
820+
# attach the files to the issue
821+
if nodeid:
822+
# extend the existing files list
823+
fileprop = cl.get(nodeid, 'file')
824+
fileprop.extend(files)
825+
props['files'] = fileprop
826+
else:
827+
# pre-load the files list
828+
props['files'] = fileprop
829+
820830

821831
#
822832
# create the message if there's a message body (content)

0 commit comments

Comments
 (0)