#6017 Should show attachment changelog when ticket gains an attachment

v1.3.0
closed
Tracker
Heith Seewald
2015-08-20
2013-03-26
No

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)

Related

Tickets: #7540

Discussion

  • Dave Brondsema

    Dave Brondsema - 2014-06-30
    • Labels: --> bitesize
     
  • Dave Brondsema

    Dave Brondsema - 2015-03-23
    • labels: bitesize --> bitesize, sf-current, sf-1
     
  • Igor Bondarenko - 2015-03-25
    • labels: bitesize, sf-current, sf-1 --> bitesize, sf-current, sf-1, 42cc
    • status: open --> in-progress
    • assigned_to: Igor Bondarenko
     
  • Igor Bondarenko - 2015-04-09
    • status: in-progress --> review
     
  • Igor Bondarenko - 2015-04-09

    Closed #751. ib/6017

     
  • Heith Seewald - 2015-04-15
    • Reviewer: Heith Seewald
     
  • Heith Seewald - 2015-04-15
    • status: review --> in-progress
     
  • Heith Seewald - 2015-04-15

    Hey Igor, looking good man.

    I just have a few notes/questions:

    1. When deleting an attachment, should we trigger the changelog()?
    2. We should probably toss in an assertion for the changelog comment. something along the lines of:
      • assert_in('<li><strong>attachments</strong>: --&gt; - test_root.py...
    3. With multiple attachments, the diff comment becomes convoluted and hard to read. Maybe we can format it so there is one file per line?

    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))

        return "\n".join(text)
    

    ~~~~~~

    I'm not sure if #3 conflicts with the mailing list formatting,but it certainly would look nicer :)

     
  • Igor Bondarenko - 2015-04-16

    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.

     
  • Igor Bondarenko - 2015-04-16
    • status: in-progress --> review
     
  • Heith Seewald - 2015-04-16

    Nice Igor! That was an elegant solution :)

     
  • Heith Seewald - 2015-04-16
    • status: review --> closed
     
  • Dave Brondsema

    Dave Brondsema - 2015-04-20
    • labels: bitesize, sf-current, sf-1, 42cc --> bitesize, sf-1, 42cc
     
  • Igor Bondarenko - 2015-06-18
    • Milestone: unreleased --> asf_release_1.3.0
     

Log in to post a comment.