[sysadmin-bin] Make sure the Foundation member is aware of when the membership actually expired



commit e610cd616d7f3ddd78fc6da87b03db673d8033ff
Author: Andrea Veri <av gnome org>
Date:   Thu Dec 4 20:01:07 2014 +0100

    Make sure the Foundation member is aware of when the membership actually expired

 membership/foundation-operations.py |   24 ++++++++++++------------
 1 files changed, 12 insertions(+), 12 deletions(-)
---
diff --git a/membership/foundation-operations.py b/membership/foundation-operations.py
index 99eafba..d6f0cf1 100755
--- a/membership/foundation-operations.py
+++ b/membership/foundation-operations.py
@@ -138,8 +138,8 @@ def remove_expired_memberships_from_foundation():
         if member in foundationmembers and convert_to_unix_time < now - 365 * 2 * 24 * 60 * 60:
             print "Removing %s from the foundation LDAP group as the membership expired on %s" % (member, 
last_renewed_on_attr)
             remove_user_from_foundation_member(member)
-            send_form_letters(expired_membership_form_letter, mail_attr, common_name_attr)
-           
+            send_form_letters(expired_membership_form_letter, mail_attr, common_name_attr, 
last_renewed_on_attr)
+
             members_list += common_name_attr + ',' + ' ' + renewed_people[common_name_attr] + '\n'
 
     send_form_letters(renewals_to_foundation_list, 'foundation-list gnome org', common_name_attr, 
members_list)
@@ -171,7 +171,7 @@ def generate_membership_list():
 
 def send_form_letters(form_letter, email, name, *args):
     today = date.today()
-    year_month = str(today.year) + '-' + str(today.month) 
+    year_month = str(today.year) + '-' + str(today.month)
 
     try:
         msg = MIMEText(form_letter.safe_substitute (
@@ -180,7 +180,7 @@ def send_form_letters(form_letter, email, name, *args):
                expired_members = args[0],
         ))
         if form_letter == renewals_to_foundation_list:
-            msg['Subject'] = "Memberships needing renewal (%s)" % year_month  
+            msg['Subject'] = "Memberships needing renewal (%s)" % year_month
         else:
             msg['Subject'] = "Your GNOME Foundation Membership"
         msg['From']    = "GNOME Foundation Membership Committee <noreply gnome org>"
@@ -323,8 +323,8 @@ The GNOME Foundation Membership Committee""")
 expired_membership_form_letter = string.Template("""
 Dear $cn,
 
-from our records it seems your GNOME Foundation Membership expired! If you want
-to continue being a member of the GNOME Foundation please make sure to submit
+from our records it seems your GNOME Foundation Membership expired on $last_renewed_on_date. (YYYY-MM-DD)
+If you want to continue being a member of the GNOME Foundation please make sure to submit
 a renewal request at https://foundation.gnome.org/membership/apply. If you did
 so already, please ignore this e-mail and wait for the GNOME Foundation Membership
 Committee to get back to you.
@@ -346,19 +346,19 @@ Thanks,
 
 renewals_to_foundation_list = string.Template("""
 Hi,
-     
+
 as per point 1.3 of [1], here it comes a list of members in need of a
 renew in case they didn't receive their individual e-mail:
-     
+
 First name Last name (Last renewed on)
 
-$expired_members    
-     
+$expired_members
+
 The Renewal form can be found at [2].
-     
+
 Cheers,
    GNOME Membership and Elections Committee
-     
+
 [1] https://mail.gnome.org/archives/foundation-list/2011-November/msg00000.html
 [2] http://www.gnome.org/foundation/membership/apply/
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]