Commit 8d8f52ac authored by Robert Speicher's avatar Robert Speicher Committed by Robert Speicher

Merge branch 'fix-transfer-project-email' into 'master'

Fix project transfer e-mail sending incorrect paths in e-mail notification

The introduction of ActiveJob and `deliver_now` in 7f214cee caused a race
condition where the mailer would be invoked before the project was committed
to the database, causing the transfer e-mail notification to show the old
path instead of the new one.

Closes #4670

See merge request !2235
parent db293040
Please view this file on the master branch, on stable branches it's out of date. Please view this file on the master branch, on stable branches it's out of date.
v 8.3.3 (unreleased)
- Fix project transfer e-mail sending incorrect paths in e-mail notification (Stan Hu)
v 8.3.2 v 8.3.2
- Disable --follow in `git log` to avoid loading duplicate commit data in infinite scroll (Stan Hu) - Disable --follow in `git log` to avoid loading duplicate commit data in infinite scroll (Stan Hu)
- Add support for Google reCAPTCHA in user registration - Add support for Google reCAPTCHA in user registration
......
...@@ -539,7 +539,9 @@ class Project < ActiveRecord::Base ...@@ -539,7 +539,9 @@ class Project < ActiveRecord::Base
end end
def send_move_instructions(old_path_with_namespace) def send_move_instructions(old_path_with_namespace)
NotificationService.new.project_was_moved(self, old_path_with_namespace) # New project path needs to be committed to the DB or notification will
# retrieve stale information
run_after_commit { NotificationService.new.project_was_moved(self, old_path_with_namespace) }
end end
def owner def owner
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment