Changeset 390


Ignore:
Timestamp:
07/06/10 14:02:55 (12 years ago)
Author:
bas
Message:

Fixed several errors for a ticket update

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/ChangeLog

    r388 r390  
     12010-07-06
     2  * Fixed several errors in ticket update:
     3     - Changed the regex expression. It must end with ':'.   
     4     - The email was lost if the ticket id was unknown. If ticket
     5       id is unknown a new ticket will be created.
     6
     7    Reported by: SARA grid team
     8    Fixed by: Bas van der Vlies
     9       
     10
     11
    1122010-06-28
    213  * Ticket update for version 0.12 did not work, closes #209
  • trunk/debian/changelog

    r388 r390  
     1email2trac (1.4.8-1) stable; urgency=low
     2
     3  * Fixed several errors in ticket update:
     4     - Changed the regex expression. It must end with ':'.
     5     - The email was lost if the ticket id was unknown. If ticket
     6       id is unknown a new ticket will be created.
     7
     8    Reported by: SARA grid team
     9    Fixed by: Bas van der Vlies
     10       
     11 -- Bas van der Vlies <basv@sara.nl>  Tue, 06 Jul 2010 13:55:43 +0200
     12
    113email2trac (1.4.7-1) stable; urgency=low
    214
  • trunk/email2trac.py.in

    r388 r390  
    746746                        id, keywords = string.split(id, '?')
    747747
    748                         # Skip the last ':' character
    749                         #
    750                         keywords = keywords[:-1]
    751748                        update_fields = self.str_to_dict(keywords)
    752749
     
    756753
    757754                except ValueError:
     755
    758756                        # Strip '#'
    759757                        #
     
    774772                try:
    775773                        tkt = Ticket(self.env, self.id, self.db)
     774
    776775                except util.TracError, detail:
     776
    777777                        # Not a valid ticket
     778
    778779                        self.id = None
    779780                        return False
     
    14671468                ticket_regex = r'''
    14681469                        (?P<new_fields>[#][?].*)
    1469                         |(?P<reply>(?P<id>[#][\d]+)(?P<fields>\?.*?:)*)
     1470                        |(?P<reply>(?P<id>[#][\d]+)(?P<fields>\?.*)?:)
    14701471                        '''
    14711472                # Check if  FullBlogPlugin is installed
     
    14971498                #
    14981499                result =  SYSTEM_RE.search(subject)
     1500
    14991501                if result:
    15001502                        # update ticket + fields
     
    15021504                        if result.group('reply') and self.TICKET_UPDATE:
    15031505                                self.system = 'ticket'
    1504                                 self.ticket_update(m, result.group('reply'), spam_msg)
     1506
     1507                                # Skip the last ':' character
     1508                                #
     1509                                if not self.ticket_update(m, result.group('reply')[:-1], spam_msg):
     1510                                        self.new_ticket(m, subject, spam_msg)
    15051511
    15061512                        # New ticket + fields
     
    15411547                        result = self.ticket_update_by_subject(subject)
    15421548                        if result:
    1543                                 self.ticket_update(m, result, spam_msg)
     1549                                if not self.ticket_update(m, result, spam_msg):
     1550                                        self.new_ticket(m, subject, spam_msg)
    15441551                        else:
    15451552                                # No update by subject, so just create a new ticket
  • trunk/email2trac.spec

    r386 r390  
    11Summary: Utilities for converting emails to trac tickets
    22Name: email2trac
    3 Version: 1.4.7
     3Version: 1.4.8
    44Release: 1
    55License: GPL
Note: See TracChangeset for help on using the changeset viewer.