Changeset 12333
- Timestamp:
- Nov 10, 2012, 12:57:39 AM (11 years ago)
- Location:
- announcerplugin/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
announcerplugin/trunk/announcer/subscribers.py
r12332 r12333 119 119 ticket = event.target 120 120 121 if not ticket['owner'] or ticket['owner'] == 'anonymous': 122 return 123 124 if re.match(r'^[^@]+@.+', ticket['owner']): 125 sid, auth, addr = None, 0, ticket['owner'] 121 if (not ticket['owner'] or ticket['owner'] == 'anonymous') and \ 122 not 'owner' in event.changes: 123 return 124 125 if ticket['owner'] and ticket['owner'] != 'anonymous': 126 if re.match(r'^[^@]+@.+', ticket['owner']): 127 sid, auth, addr = None, 0, ticket['owner'] 128 else: 129 sid, auth, addr = ticket['owner'], 1, None 130 sid = None 131 if 'owner' in event.changes: 132 previous_owner = event.changes['owner'] 133 if re.match(r'^[^@]+@.+', previous_owner): 134 sid_old, auth_old, addr_old = None, 0, previous_owner 135 else: 136 sid_old, auth_old, addr_old = previous_owner, 1, None 126 137 else: 127 sid , auth, addr = ticket['owner'], 1,None138 sid_old = None 128 139 129 140 # Default subscription 130 141 for s in self.default_subscriptions(): 131 yield (s[0], s[1], sid, auth, addr, None, s[2], s[3]) 132 142 if sid: 143 yield (s[0], s[1], sid, auth, addr, None, s[2], s[3]) 144 if sid_old: 145 yield (s[0], s[1], sid_old, auth_old, addr_old, None, s[2], 146 s[3]) 133 147 if sid: 134 148 klass = self.__class__.__name__ 135 149 for s in Subscription.find_by_sids_and_class(self.env, 136 ((sid,auth),), klass): 150 ((sid, auth),), klass): 151 yield s.subscription_tuple() 152 if sid_old: 153 klass = self.__class__.__name__ 154 for s in Subscription.find_by_sids_and_class(self.env, 155 ((sid_old, auth_old),), klass): 137 156 yield s.subscription_tuple() 138 157 -
announcerplugin/trunk/changelog
r12326 r12333 5 5 resolved issues 6 6 * #5774: No such table: subscriptions 7 * #6452: No notification sent to previous owner when a ticket is reassigned 7 8 * #7759: Update Account Manager Announcer for new subscription system 8 9 * #7834: Emails are attempted to be sent even when there are no recipients
Note: See TracChangeset
for help on using the changeset viewer.