Render absolute links in review and review reply e-mails

Review Request #9856 — Created April 4, 2018 and submitted

brennie
Review Board
release-3.0.x
c3cb211...
reviewboard

The commit that incorrectly refactored e-mail templtes to use
build_server_url() over {{domain_method}}://{{domain}} in the e-mail
templates regressed behaviour in the diff fragment template. It did not
actually pass the new site_url context variable to the template.
Additionally, we weren't actually using the context passed to
build_diff_comment_fragments to render the template.

Both issues are now resolved, resulting in correctly-rendered templates.

Viewed review and review reply preview e-mail views and saw absolute
links.

  • 0
  • 0
  • 0
  • 1
  • 1
Description From Last Updated
chipx86
  1. 
      
  2. Why not pass site_url to the template so it's consistent?

    1. It requires modifying this template + the one that the reviews view uses and reviews view. This seemed simpler.

    2. Consistency is better. It's less simple to have different conventions for URL building across different e-mail templates.

      We already pass extra context to build_diff_comment_fragments() as well.

  3. 
      
brennie
david
  1. Looks good, assuming you've re-run the testing.

  2. 
      
brennie
brennie
david
  1. Ship It!
  2. 
      
brennie
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to release-3.0.x (37ceb44)
Loading...