Changeset 653 for trunk/email2trac.py.in


Ignore:
Timestamp:
04/08/14 10:26:59 (10 years ago)
Author:
bas
Message:

added two patches:

1) applied lower to an object instead of string, closes #340
2) bug in custom field initialization, see #340

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/email2trac.py.in

    r650 r653  
    839839            cc_list = tkt['cc'].split(',')
    840840            for cc in cc_list:
    841                 if self.email_addr.lower() in cc.lower.strip():
     841                if self.email_addr.lower() in cc.lower().strip():
    842842                    self.logger.debug('ALLOW, %s is in the CC' %(self.email_addr))
    843843
     
    11151115            ## default trac value
    11161116            #
     1117            CUSTOM_FIELD = False
    11171118            if not field.get('custom'):
    11181119                value = self.get_config('ticket', 'default_%s' %(name) )
     
    11241125
    11251126            else:
    1126                 ##  Else get the default value for reporter
     1127                ##  Else get the default value for custom fields
    11271128                #
     1129                CUSTOM_FIELD = True
    11281130                value = field.get('value')
    11291131                options = field.get('options')
     
    11531155                self.print_unicode(s)
    11541156
     1157            else:
     1158                ## custom fields need some initialisation
     1159                #
     1160                if CUSTOM_FIELD:
     1161                    user_dict[name] = ''
     1162                   
    11551163        self.update_ticket_fields(ticket, user_dict, new=1)
    11561164
    11571165        if 'status' not in user_dict.keys():
    11581166            ticket['status'] = 'new'
    1159 
    11601167
    11611168    def ticket_update_by_subject(self, subject):
Note: See TracChangeset for help on using the changeset viewer.