Fix links in chat notifications for review replies.

Review Request #13943 — Created June 5, 2024 and submitted

Information

rbintegrations
release-4.x

Reviewers

Chat notifications were blindly calling review.get_absolute_url() to
get the URL to link to for the notification. Unfortunately, for
review replies, this doesn't work because we don't put an anchor for
those into the page.

This change fixes it so if we have a comment (which we use for the
notification text), we open directly to that comment, and if we don't,
we link to the parent review.

  • Ran unit tests.
  • Verified that generated links worked correctly.
Summary ID
Fix links in chat notifications for review replies.
Chat notifications were blindly calling `review.get_absolute_url()` to get the URL to link to for the notification. Unfortunately, for review replies, this doesn't work because we don't put an anchor for those into the page. This change fixes it so if we have a comment (which we use for the notification text), we open directly to that comment, and if we don't, we link to the parent review. Testing Done: - Ran unit tests. - Verified that generated links worked correctly.
b7fd9d452c1b13086e5fe2a7444c248c38e34f49
maubin
  1. Ship It!
  2. 
      
chipx86
  1. Ship It!
  2. 
      
david
Review request changed
Status:
Completed
Change Summary:
Pushed to release-4.x (5c0e86b)