Project

General

Profile

Actions

Defect #44650

closed

NoMethodError in issue update notification when bulk deleting a parent issue and its subtask

Added by Katsuya HIDAKA 21 days ago. Updated 18 days ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Email notifications
Target version:
Resolution:
Fixed
Affected version:

Description

An issue update notification can raise NoMethodError if the issue is deleted after its journal is loaded. This patch skips email generation in that case to prevent the error.

For example, this can happen when bulk deleting a parent issue and its child, with the child deleted first:

  1. Deleting the child creates a journal for the parent and queues an update notification.
  2. The notification job loads the journal. The bulk deletion then deletes the parent.
  3. Email generation cannot find the parent through the journal and raises NoMethodError.

Details:

  • Return from Mailer#issue_edit when journal.journalized is nil.
  • Reproduced this order of loading and deletion and confirmed that the patched code raises no error and sends no email.
  • Confirmed that all tests pass.

Files

Actions

Also available in: Atom PDF