Changeset 533
- Timestamp:
- 07/28/11 14:24:30 (12 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ChangeLog
r532 r533 29 29 * Fixed an error in the logging environment for Windows oses, closes #251 30 30 Reported by: kofal002 add umn dot edu 31 Fixed by: Bas van der Vlies 32 33 * Ticket_update_by_subject enhancement. If multiple tickets are found 34 with the same subject then we try a author/reporter match. If fails 35 use most recent ticket entry, closes #253 36 Reported by: kofal002 att umn dot edu 31 37 Fixed by: Bas van der Vlies 32 38 -
trunk/debian/changelog
r529 r533 1 email2trac (2.1.4-1) stable; urgency=low 2 3 * see Changelog 4 5 -- Bas van der Vlies <bas@sara.nl> Thu, 28 Jul 2011 14:22:45 +0200 6 1 7 email2trac (2.1.3-1) stable; urgency=low 2 8 -
trunk/email2trac.py.in
r532 r533 1024 1024 self.logger.debug('function ticket_update_by_subject') 1025 1025 1026 matched_id = None1026 found_id = None 1027 1027 if self.parameters.ticket_update and self.parameters.ticket_update_by_subject: 1028 1028 … … 1052 1052 self.logger.debug('Looking for summary matching: "%s"' % summary) 1053 1053 1054 sql = """SELECT id FROM ticket1054 sql = """SELECT id, reporter FROM ticket 1055 1055 WHERE changetime >= %s AND summary LIKE %s 1056 1056 ORDER BY changetime DESC""" 1057 1057 1058 cursor.execute(sql, [lookback, summary.strip()]) 1058 1059 1059 1060 for row in cursor: 1060 (matched_id,) = row 1061 1062 self.logger.debug('Found matching ticket id: %d' % matched_id) 1063 1064 break 1065 1066 if matched_id: 1067 matched_id = '#%d' % matched_id 1068 return (matched_id, orig_subject) 1069 1070 subject = orig_subject 1071 1072 return (matched_id, subject) 1061 1062 (matched_id, sql_reporter) = row 1063 1064 ## Save first entry. 1065 # 1066 if not found_id: 1067 found_id = matched_id 1068 1069 ## If subject and reporter are the same. The we certainly have found the right ticket 1070 # 1071 if sql_reporter == self.author: 1072 self.logger.debug('Found matching reporter: %s with ticket id: %d' %(sql_reporter, matched_id)) 1073 found_id = matched_id 1074 break 1075 1076 if found_id: 1077 self.logger.debug('Found matching ticket id: %d' % found_id) 1078 found_id = '#%d' % found_id 1079 return (found_id, orig_subject) 1080 1081 # obesolete !?? 1082 #subject = orig_subject 1083 1084 return (found_id, subject) 1073 1085 1074 1086
Note: See TracChangeset
for help on using the changeset viewer.