From caaa0180ebbfb4d410eff82307ba3ea17f36e101 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Nov 03 2014 09:32:48 +0000 Subject: Fix the url in the email when sending notification about new comment Relates to #23 --- diff --git a/progit/lib.py b/progit/lib.py index 74fed19..c2ebe33 100644 --- a/progit/lib.py +++ b/progit/lib.py @@ -182,7 +182,9 @@ def add_issue_comment(session, issue, comment, user, ticketfolder): update_git_ticket(issue, repo=issue.project, ticketfolder=ticketfolder) - progit.notify.notify_new_comment(issue_comment) + globalid = get_issue_global_id(session, issue.project.id, issue.id) + + progit.notify.notify_new_comment(issue_comment, globalid) return 'Comment added' diff --git a/progit/notify.py b/progit/notify.py index 4ad1b18..4fc9888 100644 --- a/progit/notify.py +++ b/progit/notify.py @@ -56,7 +56,7 @@ def send_email(text, subject, to_mail, from_mail=None, mail_id=None, return msg -def notify_new_comment(comment): +def notify_new_comment(comment, globalib): ''' Notify the people following an issue that a new comment was added to the issue. ''' @@ -76,7 +76,7 @@ New comment: '%s/%s/issue/%s' % ( progit.APP.config['APP_URL'], comment.issue.project.name, - comment.issue.id, + globalib, ), ) mail_to = set([cmt.user.emails[0].email for cmt in comment.issue.comments])