- Timestamp:
- 04/08/09 16:47:40 (15 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ChangeLog
r261 r262 11 11 Authors: Bas van der Vlies & lucas dot eisenzimmer at t-systems-mms dot com 12 12 13 * email2trac require at least python version 2.4, closes #131 14 Reported by: otto at bergerdata dot de 15 Fixed by: Bas van der Vlies 13 * email2trac require at least python version 2.4, closes #131 14 Reported by: otto at bergerdata dot de 15 Fixed by: Bas van der Vlies 16 17 * We can now set ticket fields for a new ticket via the 'subject' line: 18 - Subject: <description> #?<field=value>[,<field=value>]* 19 closes #130 20 21 Requested by: Steve 22 Implemented by: Bas van der Vlies 16 23 17 24 2009-01-30 -
trunk/debian/changelog
r261 r262 17 17 Fixed by: Bas van der Vlies 18 18 19 -- root <root@subtrac2.rc.sara.nl> Tue, 24 Mar 2009 15:26:08 +0100 19 * We can now set ticket fields for a new ticket via the 'subject' line: 20 - Subject: <description> #?<field=value>[,<field=value>]* 21 closes #130 22 23 Requested by: Steve 24 Implemented by: Bas van der Vlies 25 26 -- Bas van der Vlies <basv@ssara.nl> Tue, 24 Mar 2009 15:26:08 +0100 20 27 21 28 email2trac (0.70-1) stable; urgency=low … … 23 30 * New stable version 24 31 25 -- root <root@subtrac2.rc.sara.nl> Tue, 27 Jan 2009 15:42:32 +010032 -- Bas van der Vlies <basv@sara.nl> Tue, 27 Jan 2009 15:42:32 +0100 26 33 27 34 email2trac (0.60-1) stable; urgency=low … … 29 36 * New stable version 30 37 31 -- root<root@subtrac2.rc.sara.nl> Thu, 20 Nov 2008 11:29:59 +010038 -- Bas van der Vlies <root@subtrac2.rc.sara.nl> Thu, 20 Nov 2008 11:29:59 +0100 32 39 33 40 email2trac (0.40-1) stable; urgency=low … … 35 42 * New Version, see ChangeLog 36 43 37 -- root<root@subtrac2.rc.sara.nl> Fri, 10 Oct 2008 17:24:09 +020044 -- Bas van der Vlies <root@subtrac2.rc.sara.nl> Fri, 10 Oct 2008 17:24:09 +0200 38 45 39 46 email2trac (0.30-3) stable; urgency=low … … 42 49 * Reopen ticket if an email update is received 43 50 44 -- root<root@subtrac2.rc.sara.nl> Mon, 04 Aug 2008 16:14:12 +020051 -- Bas van der Vlies <root@subtrac2.rc.sara.nl> Mon, 04 Aug 2008 16:14:12 +0200 45 52 46 53 email2trac (0.30-2) stable; urgency=low … … 66 73 * New version with a lot of improvements 67 74 68 -- root<root@rc.sara.nl> Mon, 4 Feb 2008 11:27:27 +010075 -- Bas van der Vlies <root@rc.sara.nl> Mon, 4 Feb 2008 11:27:27 +0100 69 76 70 77 email2trac (0.10.0-2) stable; urgency=low … … 72 79 * Added extra info to syslog when exception occurs 73 80 74 -- root<root@rc.sara.nl> Fri, 3 Aug 2007 09:45:26 +020081 -- Bas van der Vlies <root@rc.sara.nl> Fri, 3 Aug 2007 09:45:26 +0200 75 82 76 83 email2trac (0.10.0-1) stable; urgency=low -
trunk/email2trac.py.in
r260 r262 525 525 Transfrom a str of the form [<key>=<value>]+ to dict[<key>] = <value> 526 526 """ 527 # Skip the last ':' character 528 # 529 fields = string.split(str[:-1], ',') 527 528 fields = string.split(str, ',') 530 529 531 530 result = dict() 532 531 for field in fields: 533 532 try: 534 index, value = string.split(field, '=')533 index, value = string.split(field, '=') 535 534 536 535 # We can not change the description of a ticket via the subject … … 619 618 try: 620 619 id, keywords = string.split(id, '?') 620 621 # Skip the last ':' character 622 # 623 keywords = keywords[:-1] 621 624 update_fields = self.str_to_dict(keywords) 622 625 … … 766 769 767 770 768 def new_ticket(self, msg, s pam):771 def new_ticket(self, msg, subject, spam, set_fields = None): 769 772 """ 770 773 Create a new ticket … … 787 790 tkt['summary'] = u'(No subject)' 788 791 else: 789 tkt['summary'] = self.email_to_unicode( msg['Subject'])792 tkt['summary'] = self.email_to_unicode(subject) 790 793 791 794 self.set_reply_fields(tkt, msg) 795 796 if set_fields: 797 rest, keywords = string.split(set_fields, '?') 798 799 if keywords: 800 update_fields = self.str_to_dict(keywords) 801 self.update_ticket_fields(tkt, update_fields) 792 802 793 803 # produce e-mail like header … … 936 946 self.notification = 0 937 947 938 print self.get_config('components', 'tracext.google.ads.*')939 940 948 # Check if FullBlogPlugin is installed 941 949 # … … 956 964 TICKET_RE = re.compile(r""" 957 965 (?P<blog>blog:(?P<blog_id>\w*)) 958 |(?P<ticket_id>[#][\d]+:) 959 |(?P<ticket_fields>[#][\d]+\?.*?:) 966 |(?P<new_fields>[#][?].*) 967 |(?P<reply>[#][\d]+:) 968 |(?P<reply_fields>[#][\d]+\?.*?:) 960 969 """, re.VERBOSE) 961 970 … … 968 977 # update ticket + fields 969 978 # 970 if result.group(' ticket_fields') and self.TICKET_UPDATE:971 self.ticket_update(m, result.group(' ticket_fields'), spam_msg)979 if result.group('reply_fields') and self.TICKET_UPDATE: 980 self.ticket_update(m, result.group('reply_fields'), spam_msg) 972 981 973 982 # Update ticket 974 983 # 975 elif result.group('ticket_id') and self.TICKET_UPDATE: 976 self.ticket_update(m, result.group('ticket_id'), spam_msg) 984 elif result.group('reply') and self.TICKET_UPDATE: 985 self.ticket_update(m, result.group('reply'), spam_msg) 986 987 # New ticket + fields 988 # 989 elif result.group('new_fields'): 990 self.new_ticket(m, subject[:result.start('new_fields')], spam_msg, result.group('new_fields')) 977 991 978 992 # Create ticket 979 993 # 980 994 else: 981 self.new_ticket(m, s pam_msg)995 self.new_ticket(m, subject, spam_msg) 982 996 983 997 def strip_signature(self, text):
Note: See TracChangeset
for help on using the changeset viewer.