abort "Redmine requires Bundler 1.5.0 or higher (you're using #{Bundler::VERSION}).\nPlease update with 'gem update bundler'."
end
-gem "rails", "5.1.6"
+gem "rails", "5.2.0"
gem "coderay", "~> 1.1.1"
gem "request_store", "1.0.5"
gem "mime-types", "~> 3.0"
# Returns the previous assignee whenever we're before the save
# or in after_* callbacks
def previous_assignee
- # This is how ActiveRecord::AttributeMethods::Dirty checks if we're in a after_* callback
- if previous_assigned_to_id = mutation_tracker.equal?(mutations_from_database) ? assigned_to_id_in_database : assigned_to_id_before_last_save
+ if previous_assigned_to_id = assigned_to_id_change_to_be_saved.nil? ? assigned_to_id_before_last_save : assigned_to_id_in_database
Principal.find_by_id(previous_assigned_to_id)
end
end
# This file is used by Rack-based servers to start the application.
require ::File.expand_path('../config/environment', __FILE__)
-run RedmineApp::Application
+run Rails.application
user = User.find(3)
user.members.update_all ["mail_notification = ?", false]
user.update! :mail_notification => 'only_assigned'
-
issue = Issue.find(2)
+
issue.assigned_to = nil
assert_include user.mail, issue.recipients
issue.save!
+ assert_include user.mail, issue.recipients
+
+ issue.assigned_to = User.find(2)
+ issue.save!
assert !issue.recipients.include?(user.mail)
end
assert assignee.notify_about?(issue)
assert new_assignee.notify_about?(issue)
+ issue.save!
+ assert assignee.notify_about?(issue)
+ assert new_assignee.notify_about?(issue)
+
issue.save!
assert !assignee.notify_about?(issue)
assert new_assignee.notify_about?(issue)