207: Include bug links in e-mail

david
Sept. 7, 2008
Jenny wants links directly to bugs inside the review request e-mails, which
seems like a reasonable request.
chipx86
#1 chipx86
  • +Component-EMail
chipx86
#2 chipx86
  • +EasyFix
#3 timw.a******@gmai***** (Google Code) (Is this you? Claim this profile.)
Here is how I accomplished this locally.
  • +
    Index: reviews/templatetags/reviewtags.py
    ===================================================================
    --- reviews/templatetags/reviewtags.py	(revision 1477)
    +++ reviews/templatetags/reviewtags.py	(working copy)
    @@ -355,7 +355,21 @@
     
         return None
     
    +@register.filter
    +def bug_urls(bug_ids, review_request):
    +    """
    +    Returns the URLs based on zero or more bug numbers on the specified review request.
     
    +    If the repository the review request belongs to doesn't have an
    +    associated bug tracker, this returns the passed-in IDs.
    +    """
    +    if review_request.repository.bug_tracker:
    +        return map(lambda bug_id: review_request.repository.bug_tracker % bug_id, bug_ids)
    +
    +    return map(lambda bug_id: str(bug_id), bug_ids)
    +
    +
    +
     @register.filter
     def diffsets_with_comments(review, current_pair):
         """
    Index: templates/reviews/review_request_email.txt
    ===================================================================
    --- templates/reviews/review_request_email.txt
david
#4 david
Fixed in SVN r1494. Thanks!
  • +Fixed