Changeset 297 for trunk


Ignore:
Timestamp:
01/07/10 16:49:51 (12 years ago)
Author:
bas
Message:

added a new parameter subject_field_separator default value is &, closes #166

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/debian/changelog

    r296 r297  
    3939   Reported by: hju att jochenkuhl dot de
    4040   Fixed by: Bas van der Vlies
     41
     42 * Added a new parameter:
     43     * subject_field_separator, default value is &
     44
     45   This is used to set tickets fields via the subject line. It used to
     46   be , .For backwards compatibility we introduced this parameter.
     47   closes #166
     48   Suggested by: Dennis McRitchie ( dmcr at Princeton dot EDU )
     49   Fixed by    : Bas van der Vlies
    4150   
    4251 -- Bas van der Vlies <bas@sara.nl>  Thu, 22 Oct 2009 17:47:50 +0200
  • trunk/email2trac.py.in

    r296 r297  
    4242    project      : /data/trac/test   # REQUIRED
    4343    debug        : 1                 # OPTIONAL, if set print some DEBUG info
    44     trac_version : 0.9               # OPTIONAL, default is 0.11
     44    trac_version : 0.10              # OPTIONAL, default is 0.11
    4545
    4646    [jouvin]                         # OPTIONAL project declaration, if set both fields necessary
     
    261261                        self.IGNORE_TRAC_USER_SETTINGS = 0
    262262
     263                if parameters.has_key('subject_field_separator'):
     264                        self.SUBJECT_FIELD_SEPARATOR = parameters['subject_field_separator'].strip()
     265                else:
     266                        self.SUBJECT_FIELD_SEPARATOR = '&'
     267
    263268        def spam(self, message):
    264269                """
     
    516521                """
    517522
    518                 fields = string.split(s, ',')
     523                fields = string.split(s, self.SUBJECT_FIELD_SEPARATOR)
    519524
    520525                result = dict()
     
    534539                        except ValueError:
    535540                                pass
    536 
    537541                return result
    538542
Note: See TracChangeset for help on using the changeset viewer.