Changeset 360


Ignore:
Timestamp:
05/20/10 08:52:13 (14 years ago)
Author:
bas
Message:

Added an extra option ticket_update_by_subject_lookback in combo with
ticket_update_by_subject. Default value is 30 days, see #188

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/ChangeLog

    r358 r360  
    2222  * Added a new option. It is all in the name:
    2323      * ticket_update_by_subject, default value is off
     24      * ticket_update_by_subject_lookback, default 30 days
    2425
    2526    When this option is enabled and there is no ticket number found
     
    2930    Author: Konstantin Ryabitsev <icon add mricon dot com> & Bas van der Vlies
    3031    Applied by: Bas van der Vlies
    31    
     32
     33  * Added DiscussionPlugin support, closes 197. For description see:
     34     - https://trac-hacks.org/wiki/DiscussionPlugin
     35
     36   Author: ibarton add fit dot vutbr dot cz (alias Blackhex)
     37   Applied by with some modification: Bas van der Vlies
     38
    32392010-03-20
    3340
  • trunk/debian/changelog

    r355 r360  
    1 email2trac (1.4.0-1) stable; urgency=low
     1email2trac (1.4.0-2) stable; urgency=low
    22
    33  * See Changelog
  • trunk/email2trac.py.in

    r359 r360  
    203203                        self.TICKET_UPDATE_BY_SUBJECT = 0
    204204
     205                if parameters.has_key('ticket_update_by_subject_lookback'):
     206                        self.TICKET_UPDATE_BY_SUBJECT_LOOKBACK = int(parameters['ticket_update_by_subject_lookback'])
     207                else:
     208                        self.TICKET_UPDATE_BY_SUBJECT_LOOKBACK = 30
     209
    205210                if parameters.has_key('drop_spam'):
    206211                        self.DROP_SPAM = int(parameters['drop_spam'])
     
    919924                                summaries = [orig_subject, '%%: %s' % orig_subject]
    920925
    921                                 # hard-code the time to 30 days for now. Can easily be
    922                                 # made configurable
    923                                 lookback = int(time.mktime(time.gmtime())) - 2592000
     926                                ##
     927                                # Convert days to seconds
     928                                lookback = int(time.mktime(time.gmtime())) - \
     929                                                self.TICKET_UPDATE_BY_SUBJECT_LOOKBACK * 24 * 3600
     930
    924931
    925932                                for summary in summaries:
Note: See TracChangeset for help on using the changeset viewer.