mirror of
https://github.com/meineerde/redmine.git
synced 2026-03-11 03:33:07 +00:00
Editing issues no longer sends notifications to previous assignee (#26627).
git-svn-id: http://svn.redmine.org/redmine/branches/3.4-stable@17002 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
80cf4fd5db
commit
4254148986
@ -116,8 +116,6 @@ class Issue < ActiveRecord::Base
|
||||
after_save :after_create_from_copy
|
||||
after_destroy :update_parent_attributes
|
||||
after_create :send_notification
|
||||
# Keep it at the end of after_save callbacks
|
||||
after_save :clear_assigned_to_was
|
||||
|
||||
# Returns a SQL conditions string used to find all issues visible by the specified user
|
||||
def self.visible_condition(user, options={})
|
||||
|
||||
@ -1883,8 +1883,6 @@ class IssueTest < ActiveSupport::TestCase
|
||||
issue = Issue.find(2)
|
||||
issue.assigned_to = nil
|
||||
assert_include user.mail, issue.recipients
|
||||
issue.save!
|
||||
assert !issue.recipients.include?(user.mail)
|
||||
end
|
||||
|
||||
def test_recipients_should_not_include_users_that_cannot_view_the_issue
|
||||
@ -2443,9 +2441,8 @@ class IssueTest < ActiveSupport::TestCase
|
||||
|
||||
def test_update_should_notify_previous_assignee
|
||||
ActionMailer::Base.deliveries.clear
|
||||
user = User.find(3)
|
||||
user.members.update_all ["mail_notification = ?", false]
|
||||
user.update! :mail_notification => 'only_assigned'
|
||||
user = User.generate!(:mail_notification => 'only_assigned')
|
||||
Issue.where(:id => 2).update_all(:assigned_to_id => user.id)
|
||||
|
||||
with_settings :notified_events => %w(issue_updated) do
|
||||
issue = Issue.find(2)
|
||||
|
||||
@ -1196,10 +1196,6 @@ class UserTest < ActiveSupport::TestCase
|
||||
issue.assigned_to = new_assignee
|
||||
assert assignee.notify_about?(issue)
|
||||
assert new_assignee.notify_about?(issue)
|
||||
|
||||
issue.save!
|
||||
assert !assignee.notify_about?(issue)
|
||||
assert new_assignee.notify_about?(issue)
|
||||
end
|
||||
|
||||
def test_notify_about_news
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user