diff --git a/progit/lib.py b/progit/lib.py index 097ac6d..0d2e0a9 100644 --- a/progit/lib.py +++ b/progit/lib.py @@ -252,7 +252,7 @@ def add_issue_assignee(session, issue, assignee, user, ticketfolder): issue, repo=issue.project, ticketfolder=ticketfolder) globalid = get_issue_global_id(session, issue.project.id, issue.id) - progit.notify.notify_assigned_issue(issue, globalid) + progit.notify.notify_assigned_issue(issue, user_obj, globalid) return 'Issue assigned' diff --git a/progit/notify.py b/progit/notify.py index 29c2ded..b29a36a 100644 --- a/progit/notify.py +++ b/progit/notify.py @@ -131,7 +131,7 @@ New issue: ) -def notify_assigned_issue(issue, globalib): +def notify_assigned_issue(issue, new_assignee, globalib): ''' Notify the people following an issue that the assignee changed. ''' text = """ @@ -153,6 +153,8 @@ The issue: `%s` of project: `%s` has been assigned to `%s` by %s. mail_to.add(issue.project.user.emails[0].email) if issue.assignee and issue.assignee.emails: mail_to.add(issue.assignee.emails[0].email) + if new_assignee and new_assignee.emails: + mail_to.add(new_assignee.emails[0].email) send_email( text,