Feature #2694

Notification on loosing assignment

Added by Teddy L over 3 years ago. Updated 4 months ago.

Status:Closed Start date:2009-02-07
Priority:Normal Due date:
Assignee:Jean-Philippe Lang % Done:

0%

Category:Email notifications
Target version:1.4.0
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

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

Updated method in issue.rb

 1  def recipients
 2    recipients = project.recipients
 3    # Author and assignee are always notified unless they have been locked
 4    recipients << author.mail if author && author.active?
 5    recipients << assigned_to.mail if assigned_to && assigned_to.active?
 6
 7    old_assigned_to_id = @current_journal.old_value_for('assigned_to_id') if @current_journal
 8    old_assigned_to = User.find_by_id(old_assigned_to_id) if old_assigned_to_id
 9    recipients << old_assigned_to.mail if old_assigned_to && old_assigned_to.active?
10
11    recipients.compact.uniq
12  end


Related issues

duplicated by Defect #9551: Changing assignee should be notify the previous assignee Closed 2011-11-11

Associated revisions

Revision 8695
Added by Jean-Philippe Lang 4 months ago

Notify previous assignee when assignee changes (#2694).

History

#1 Updated by Markus Knittig over 3 years ago

+1

#2 Updated by Jean-Philippe Lang 4 months ago

  • Subject changed from Notification on loosing assignement to Notification on loosing assignment
  • Status changed from New to Closed
  • Assignee set to Jean-Philippe Lang
  • Target version set to 1.4.0
  • Resolution set to Fixed

Implemented in r8695.

Also available in: Atom PDF