Custom Query (332 matches)

Filters
 
Or
 
  
 
Columns

Show under each result:


Results (64 - 66 of 332)

Ticket Resolution Summary Owner Reporter
#62 fixed email notification on ticket_update doesn't work when project has no components bas gernot.hillier@…
Description

When sending a ticket update via mail to a project that has no components, email2trac will manage to update the ticket in the database, but the email notification isn't sent.

It will fail with:

email2trac: Traceback (most recent call last):
email2trac:   File "/usr/local/bin/email2trac", line 1137, in <module>     tktparser.parse(sys.stdin)
email2trac:   File "/usr/local/bin/email2trac", line 723, in parse     if self.ticket_update(m):
email2trac:   File "/usr/local/bin/email2trac", line 602, in ticket_update     self.notify(tkt, False, when)
email2trac:   File "/usr/local/bin/email2trac", line 857, in notify     if tkt['component'] == 'Spam':
email2trac:   File "/var/lib/python-support/python2.5/trac/ticket/model.py", line 104, in __getitem__     return self.values[name]
email2trac: KeyError: 'component' 

#63 fixed Crash when parsing X-Spam-Score headers with no score bas email2trac@…
Description

Given a non-spam email, i.e. the X-Spam-Score header is present, but has no value, the script will crash with:

Traceback (most recent call last):
  File "/usr/bin/email2trac", line 1137, in ?     tktparser.parse(sys.stdin)
  File "/usr/bin/email2trac", line 710, in parse     component =  self.spam(m)
  File "/usr/bin/email2trac", line 245, in spam     number = spam_l[0].count('*')
IndexError: list index out of range

Patch as follows:

--- email2trac.orig     2008-05-29 15:02:15.000000000 -0700
+++ email2trac  2008-05-29 15:04:09.000000000 -0700
@@ -242,7 +242,10 @@
                spam = False
                if message.has_key('X-Spam-Score'):
                        spam_l = string.split(message['X-Spam-Score'])
-                       number = spam_l[0].count('*')
+                       if len(spam_l) == 0:
+                               number = 0
+                       else:
+                               number = spam_l[0].count('*')
 
                        if number >= self.SPAM_LEVEL:
                                spam = True
#64 fixed Configuration flag for SpamAssassin header bas email2trac@…
Description

Spam filtering uses the header X-Spam-Score as a hard-coded value.

Recent versions of SpamAssassin? uses X-Spam-Level instead, thus it will be useful if there is a configuration option for the header.

Providing the standard value as default will be nice too.

Note: See TracQuery for help on using queries.