- Timestamp:
- 01/11/11 16:43:48 (13 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ChangeLog
r506 r508 72 72 Reported by: Wim Rijks 73 73 Author: Bas van der Vlies 74 74 75 * Added a notifcation function that always send an email to the reporter if 76 the ticket is updated via email: closes: #178, #229 77 - always_notify_reporter : 1 (default: 0) 78 - notify_reporter_black_list : basv@sara.nl (default: 0) 79 Author: hju add jochenkuhl dot de 80 Applied by: Bas van der Vlies 81 75 82 1.6.0 (2010-8-10) 76 83 * Fixed an Unicode error in strip_quotes -
trunk/debian/changelog
r506 r508 1 email2trac (2.0.1-2) stable; urgency=low 2 3 * See Changelog 4 5 -- Bas van der Vlies <basv@sara.nl> Tue, 11 Jan 2011 16:39:49 +0100 6 1 7 email2trac (2.0.1-1) stable; urgency=low 2 8 -
trunk/email2trac.py.in
r507 r508 84 84 from trac import config as trac_config 85 85 86 # Some global variables86 ## Some global variables 87 87 # 88 88 m = None 89 90 # This is to for the function AlwaysNotifyReporter 91 sender_email = None 89 92 90 93 class SaraDict(UserDict.UserDict): … … 2108 2111 self.logger.debug('function notify()') 2109 2112 2110 if self.parameters.dry_run: 2113 if self.parameters.always_notify_reporter: 2114 global sender_email 2115 sender_email = self.email_addr 2116 2117 self.logger.debug('\t Using Email2TracNotification function AlwaysNotifyReporter') 2118 import trac.notification as Email2TracNotification 2119 Email2TracNotification.Notify.notify = AlwaysNotifyReporter 2120 2121 if self.parameters.dry_run : 2111 2122 print 'DRY_RUN: self.notify(tkt, True) reporter = %s' %tkt['reporter'] 2112 2123 return … … 2129 2140 self.env.href = Href(self.get_config('project', 'url')) 2130 2141 2131 2132 2142 tn = TicketNotifyEmail(self.env) 2133 2143 … … 2154 2164 self.logger.error('Failure sending notification on creation of ticket #%s: %s' %(self.id, e)) 2155 2165 2156 2166 ########## END Class Definition ######################################################## 2167 2168 ########## Global Notificaition Function ################################################ 2169 def AlwaysNotifyReporter(self, resid): 2170 """ 2171 Copy of def notify() to manipulate recipents to always include reporter for the 2172 notification. 2173 """ 2174 (torcpts, ccrcpts) = self.get_recipients(resid) 2175 2176 if not tktparser.email_header_acl('notify_reporter_black_list', sender_email, False): 2177 ## additionally append sender (regardeless of settings in trac.ini) 2178 # 2179 if not sender_email in torcpts: 2180 torcpts.append(sender_email) 2181 2182 self.begin_send() 2183 self.send(torcpts, ccrcpts) 2184 self.finish_send() 2157 2185 2158 2186 ########## Parse Config File ###########################################################
Note: See TracChangeset
for help on using the changeset viewer.