Project

General

Profile

Actions

Feature #2694

closed

Notification on loosing assignment

Added by Teddy L almost 16 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Normal
Category:
Email notifications
Target version:
Start date:
2009-02-07
Due date:
% Done:

0%

Estimated time:
Resolution:
Fixed

Description

When the user assigned to an issue change, old assigned user should receive a notification to be aware of this update too.

New method in journals.rb

    def old_value_for(prop)
        c = details.detect {|detail| detail.prop_key == prop}
        c ? c.old_value : nil
    end

Updated method in issue.rb

  def recipients
    recipients = project.recipients
    # Author and assignee are always notified unless they have been locked
    recipients << author.mail if author && author.active?
    recipients << assigned_to.mail if assigned_to && assigned_to.active?

    old_assigned_to_id = @current_journal.old_value_for('assigned_to_id') if @current_journal
    old_assigned_to = User.find_by_id(old_assigned_to_id) if old_assigned_to_id
    recipients << old_assigned_to.mail if old_assigned_to && old_assigned_to.active?

    recipients.compact.uniq
  end


Related issues

Related to Redmine - Defect #19197: Missing notification if assignee was a groupClosedJean-Philippe Lang

Actions
Has duplicate Redmine - Defect #9551: Changing assignee should be notify the previous assigneeClosed2011-11-11

Actions
Actions

Also available in: Atom PDF