When an attachment is added to a ticket comment, a nice email is sent with some attachment info.
When a ticket is edited and an attachment is added, a blank changelog comment is created and emailed. Instead of being blank, it should contain the same info as is emailed for an attachment added via comment. E.g. Attachment: screenshot.jpg (79.3 kB; image/jpeg)
Closed #751.
ib/6017
Hey Igor, looking good man.
I just have a few notes/questions:
assert_in('<li><strong>attachments</strong>: --> - test_root.py
...Something like:
~~~~~~:::python
def attachments_info(attachments):
# untested
text = []
for attach in attachments:
text.append("{} {} ({}; {})".format('- ', attach.filename, h.do_filesizeformat(attach.length), attach.content_type))
~~~~~~
I'm not sure if #3 conflicts with the mailing list formatting,but it certainly would look nicer :)
Closed #756. Force-pushed
ib/6017
(rebase)I've tried suggested formatting, but it's looking pretty weird (see attachment). I think I've found good alternative, though: displaying attachments list as actual diff (similar to what changelog for ticket's description does). It is straightforward to see what was added/removed, and does not have a problem with multiple attachments.
Nice Igor! That was an elegant solution :)