Defect #25794

Mass-deleted attachments are not represented correctly in email notifications

Added by Felix Schäfer 9 months ago. Updated 8 months ago.

Status:ClosedStart date:
Priority:UrgentDue date:
Assignee:Jean-Philippe Lang% Done:

0%

Category:Issues
Target version:-
Resolution:Fixed Affected version:

Description

When deleting more than one attachment through the mass-delete attachments feature on the issue edit pane, only the first deleted attachment is in email notifications that are sent out for this event. The journal details are also created for the remaining deleted attachments, but they are not part of the email notifications.

This is due to source:/trunk/app/models/issue.rb@16545#L1742 calling current_journal.save after each deleted attachment. This causes the email notification for the journal to be sent on the first time it is called, still missing the other attachment deletions.

I'm not quite sure of the best way to solve this as removing the currrent_journal.save messes with other things, for example removing a single attachment via clicking the trash bin next to it.


Related issues

Related to Redmine - Feature #13072: Delete multiple attachments with one action Closed
Related to Redmine - Feature #25538: Drop support for Ruby 2.2.1 and ealier, 2.2.2+ is now req... Closed
Related to Redmine - Defect #26627: Editing issues no longer sends notifications to previous ... Closed

Associated revisions

Revision 16573
Added by Jean-Philippe Lang 8 months ago

Send journal notification after commit (#25794).

Revision 16582
Added by Toshi MARUYAMA 8 months ago

Gemfile: pin test_after_commit version 0.4 (#25794)

test_after_commit >= 0.5 requires Ruby >= 2.0.0

History

#1 Updated by Felix Schäfer 9 months ago

I just noticed I linked to the wrong tag: this only affects trunk currently. Sorry for the confusion.

#2 Updated by Mischa The Evil 9 months ago

  • Related to Feature #13072: Delete multiple attachments with one action added

#3 Updated by Mischa The Evil 9 months ago

  • Description updated (diff)
  • Affected version deleted (3.3.3)

Good catch. I've adjusted the issue properties accordingly.

#4 Updated by Mischa The Evil 9 months ago

  • Description updated (diff)

Corrected the source link to current trunk. Sorry for the fuzz...

#5 Updated by Felix Schäfer 9 months ago

Thanks Mischa :-)

#6 Updated by Jean-Philippe Lang 8 months ago

  • Status changed from New to Closed
  • Assignee set to Jean-Philippe Lang
  • Resolution set to Fixed

Fixed in r16573 by sending the notification after commit.

#7 Updated by Go MAEDA 8 months ago

  • Target version set to 3.4.0

Setting target version to put this issue in changelog.

#8 Updated by Jean-Philippe Lang 8 months ago

  • Target version deleted (3.4.0)

This defect is related to a feature added in 3.4.0, it should not appear in the changelog.

#9 Updated by Go MAEDA 8 months ago

  • Related to Feature #25538: Drop support for Ruby 2.2.1 and ealier, 2.2.2+ is now required added

#10 Updated by Toshi MARUYAMA 6 months ago

  • Related to Defect #26627: Editing issues no longer sends notifications to previous assignee added

Also available in: Atom PDF