Render absolute links in review and review reply e-mails
Review Request #9856 — Created April 4, 2018 and submitted
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 newsite_urlcontext variable to the template.
Additionally, we weren't actually using the context passed to
build_diff_comment_fragmentsto 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.
| Description | From | Last Updated | 
|---|---|---|
| Why not pass site_url to the template so it's consistent? |  | 
- Description:
- 
    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. This ~ template is rendered by ~ reviewboard.reviews.views.build_diff_comment_fragments, which still~ templates regressed behaviour in the diff fragment template. It did not ~ actually pass the new site_urlcontext variable to the template. We now~ do so. - passes domain_methodanddomaininstead ofsite_root.- - The template has been reverted to use the original template variables - and e-mails now once again have absolute links for diff fragments. 
- Commit:
- 
    5e820c0401111b8b77e65164d56fe14b32dbeffae483f1b8117ed48d256be0338ae74048ab503cf3
Checks run (2 succeeded)
- Description:
- 
    The commit that incorrectly refactored e-mail templtes to use build_server_url()over{{domain_method}}://{{domain}}in the e-mailtemplates regressed behaviour in the diff fragment template. It did not ~ actually pass the new site_urlcontext variable to the template. We now~ do so. ~ actually pass the new site_urlcontext variable to the template.~ Additionally, we weren't actually using the context passed to + build_diff_comment_fragmentsto render the template.+ + Both issues are now resolved, resulting in correctly-rendered templates. 
- Testing Done:
- 
    ~ Viewed test e-mails and saw absolute links. ~ Viewed review and review reply preview e-mail views and saw absolute + links. 
- Commit:
- 
    e483f1b8117ed48d256be0338ae74048ab503cf3c3cb2116f2c57a29fb25e16f76eaba8681251593
